lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Aug 2008 13:15:29 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Neil Horman <nhorman@...driver.com>
Cc:	netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net,
	jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
	bruce.w.allan@...el.com, john.ronciak@...el.com
Subject: Re: [PATCH] catch up device stats when multicast > total frames

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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ