Thread (1 message) 1 message, 1 author, 2012-02-14

RE: [PATCH] bnx2x: preserve net device stats across reload

From: Yuval Mintz <hidden>
Date: 2012-02-14 07:09:08

The network device statistics were reset to zero when the bnx2x driver
reloaded the NIC, such as when changing the MTU.

To preserve the statistics across reloads, save the current values when
unloading. Add the saved values to the values read currently from the
hardware when updating the stats. Forget the saved values if the reason
for unloading is that the device is going down.
 
Thanks for this patch -  indeed there is currently a problem with statistics 
reset during inner reloads such as MTU changes. 

However, notice that keeping the net_device_stats statistics consistent 
across such changes is only a very partial solution, since most of the 
statistics will still be reset. E.g., bp->eth_stats will be reset, causing ethtool 
to output zero statistics after such an inner reload.

I'm currently working on a patch to fix this issue. Since my patch will make
the statistics in bnx2x_eth_stats consistent after an inner reload, 
the changes made here will be unrequired, since all the net_device_stats 
are direct products of bnx2x_eth_stats (with the exception of one field).

I will try to submit it later on today.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help