From: David Miller <davem@davemloft.net>
To: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org, gospo@redhat.com,
peter.p.waskiewicz.jr@intel.com
Subject: Re: [net-next-2.6 PATCH v5 0/3] Introduce n-tuple ethtool support
Date: Wed, 10 Feb 2010 19:54:45 -0800 (PST) [thread overview]
Message-ID: <20100210.195445.190157100.davem@davemloft.net> (raw)
In-Reply-To: <20100211020310.23436.85885.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 10 Feb 2010 18:07:18 -0800
> One more round of fixes, based on feedback from Patrick McHardy
>
> 1) Change the list count to an unsigned value
> 2) Fix a memory leak
> 3) Removed an unnecessary list traversal in the ethtool core
> 4) Moved all list destruction to a helper function, allowing the driver
> to control when it clears the list (aside from when free_netdev() kills
> the cached list).
All applied, thanks.
Pj, can you look a shoring up the behavior of one more thing for me?
When rules get added, it first installs the filter by calling into
the driver.
_Then_ is tries to add the software copy of the rule to the device
list. This does an allocation which may fail.
If it does fail, we return -ENOMEM but we left the device configured
with the new rule.
Probably better to do it something like:
p = NULL;
if (need_sw_rule_list)
p = alloc_rule();
if (!p)
return -ENOMEM;
}
ret = op->install_rule();
if (ret) {
kfree(p);
return ret;
}
if (need_sw_rule_list)
sw_rule_insert(dev, p);
You get the idea, we can do the kfree() unconditonally because kfree(NULL)
is OK, etc.
next prev parent reply other threads:[~2010-02-11 3:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 2:07 [net-next-2.6 PATCH v5 0/3] Introduce n-tuple ethtool support Jeff Kirsher
2010-02-11 2:07 ` [net-next-2.6 PATCH v5 1/3] ethtool: Introduce n-tuple filter programming support Jeff Kirsher
2010-02-11 2:07 ` [net-next-2.6 PATCH v5 2/3] ixgbe: Add support for the new ethtool n-tuple programming interface Jeff Kirsher
2010-02-11 2:08 ` [net-next-2.6 PATCH v5 3/3] ixgbe: Bump driver version up Jeff Kirsher
2010-02-11 3:54 ` David Miller [this message]
2010-02-11 4:01 ` [net-next-2.6 PATCH v5 0/3] Introduce n-tuple ethtool support David Miller
2010-02-11 4:18 ` Peter P Waskiewicz Jr
2010-02-14 11:56 ` includes build break - was " Oliver Hartkopp
2010-02-15 6:38 ` David Miller
2010-02-11 8:02 ` robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100210.195445.190157100.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).