tmp_suning_uos_patched/drivers/net/ixgbe
Eric Dumazet 60d5113428 ixgbe: Fix TX stats accounting
Here is an updated version, because ixgbe_get_ethtool_stats()
needs to call dev_get_stats() or "ethtool -S" wont give
correct tx_bytes/tx_packets values.

Several cpus can update netdev->stats.tx_bytes & netdev->stats.tx_packets
in parallel. In this case, TX stats are under estimated and false sharing
takes place.

After a pktgen session sending exactly 200000000 packets :
# ifconfig fiber0 | grep TX
          TX packets:198501982 errors:0 dropped:0 overruns:0 carrier:0

Multi queue devices should instead use txq->tx_bytes & txq->tx_packets
in their xmit() method (appropriate txq lock already held by caller, no
cache line miss), or use appropriate locking.

After patch, same pktgen session gives :

# ifconfig fiber0 | grep TX
          TX packets:200000000 errors:0 dropped:0 overruns:0 carrier:0

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-08 20:10:12 -08:00
..
ixgbe_82598.c ixgbe: Fix backplane flow control autoneg 2009-09-30 20:02:55 -07:00
ixgbe_82599.c ixgbe: Add support for 82599 alternative WWNN/WWPN prefix 2009-10-29 01:04:01 -07:00
ixgbe_common.c ixgbe: Fix Receive Address Register (RAR) cleaning and accounting 2009-11-29 00:34:00 -08:00
ixgbe_common.h ixgbe: cleanup functions that should have been defined static 2009-08-26 15:36:46 -07:00
ixgbe_dcb_82598.c
ixgbe_dcb_82598.h
ixgbe_dcb_82599.c ixgbe: Properly disable DCB arbiters prior to applying changes 2009-09-01 17:40:18 -07:00
ixgbe_dcb_82599.h
ixgbe_dcb_nl.c dcb: data center bridging ops should be r/o 2009-10-07 01:10:47 -07:00
ixgbe_dcb.c
ixgbe_dcb.h
ixgbe_ethtool.c ixgbe: Fix TX stats accounting 2009-12-08 20:10:12 -08:00
ixgbe_fcoe.c ixgbe: use known user priority for FCoE when DCB is enabled 2009-12-03 15:43:20 -08:00
ixgbe_fcoe.h ixgbe: use known user priority for FCoE when DCB is enabled 2009-12-03 15:43:20 -08:00
ixgbe_main.c ixgbe: Fix TX stats accounting 2009-12-08 20:10:12 -08:00
ixgbe_phy.c
ixgbe_phy.h
ixgbe_type.h ixgbe: Add support for 82599 alternative WWNN/WWPN prefix 2009-10-29 01:04:01 -07:00
ixgbe.h ixgbe: performance tweaks 2009-12-03 15:43:22 -08:00
Makefile