]> bbs.cooldavid.org Git - net-next-2.6.git/commit
ixgbe: fix stats handling
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 20 Oct 2010 23:00:04 +0000 (23:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 10:55:22 +0000 (03:55 -0700)
commitde1036b1cea147c5049c65f5bd26fb451f1624cd
tree35406b956bd4d39d73becf2bb28ea37c6e040e27
parent3a338cbb8bb46a6b86f4dca54bf73b9c78751659
ixgbe: fix stats handling

Current ixgbe stats have following problems :

- Not 64 bit safe (on 32bit arches)

- Not safe in ixgbe_clean_rx_irq() :
   All cpus dirty a common location (netdev->stats.rx_bytes &
netdev->stats.rx_packets) without proper synchronization.
   This slow down a bit multiqueue operations, and possibly miss some
updates.

Fixes :

Implement ndo_get_stats64() method to provide accurate 64bit rx|tx
bytes/packets counters, using 64bit safe infrastructure.

ixgbe_get_ethtool_stats() also use this infrastructure to provide 64bit
safe counters.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe.h
drivers/net/ixgbe/ixgbe_ethtool.c
drivers/net/ixgbe/ixgbe_main.c