From: Ben Hutchings <bhutchings@solarflare.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
bruce.w.allan@intel.com, jesse.brandeburg@intel.com,
john.ronciak@intel.com, jeffrey.t.kirsher@intel.com
Subject: Re: [PATCH] catch up device stats when multicast > total frames
Date: Tue, 5 Aug 2008 13:15:29 +0100 [thread overview]
Message-ID: <20080805121527.GZ10471@solarflare.com> (raw)
In-Reply-To: <20080805115018.GB22123@hmsreliant.think-freely.org>
Neil Horman wrote:
> Hey-
> REcently observed a problem wherein, if a BMC or other IPMI device is
> attached to a NIC, multicast frames can be consumed by the aformentioned device
> without ever being seen by the driver. Since multicast frames are counted in
> the hardware and the total frame counter is counted in the driver napi routine,
I'd be surprised if the hardware does not also maintain a total frame
counter. If not, you can possibly calculate the total as good + bad
packets, or unicast + multicast + broadcast + bad, or something like that.
[...]
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -3761,6 +3761,8 @@ e1000_update_stats(struct e1000_adapter *adapter)
> /* Fill out the OS statistics structure */
> adapter->net_stats.multicast = adapter->stats.mprc;
> adapter->net_stats.collisions = adapter->stats.colc;
> + if (adapter->net_stats.rx_packets < adapter->net_stats.multicast)
> + adapter->net_stats.rx_packets = adapter->net_stats.multicast;
>
> /* Rx Errors */
>
[...]
This is a botch - it means the numbers can't be so obviously wrong, but
doesn't make them correct.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
next prev parent reply other threads:[~2008-08-05 12:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 11:50 [PATCH] catch up device stats when multicast > total frames Neil Horman
2008-08-05 12:15 ` Ben Hutchings [this message]
2008-08-05 13:16 ` Neil Horman
2008-08-05 16:43 ` [E1000-devel] [PATCH] catch up device stats when multicast >total frames Brandeburg, Jesse
2008-08-05 16:53 ` Neil Horman
2008-08-05 17:12 ` Ingo Oeser
2008-08-05 16:52 ` [PATCH] catch up device stats when multicast > total frames Ronciak, John
2008-08-05 18:03 ` Neil Horman
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=20080805121527.GZ10471@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=bruce.w.allan@intel.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.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).