]> git.baikalelectronics.ru Git - kernel.git/commit
forcedeth: fix stats on hardware without extended stats support
authordavid decotigny <david.decotigny@google.com>
Fri, 11 Nov 2011 16:27:34 +0000 (16:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2011 05:14:39 +0000 (00:14 -0500)
commitebaad294c093c6d5b533b2e537d564be1de9b033
tree6a203f978aa250a541f6ac404e25a8ab599b9d77
parentbcfec5b0844bcc13f926c3aa257fe0cf17591838
forcedeth: fix stats on hardware without extended stats support

This change makes sure that tx_packets/rx_bytes ifconfig counters are
updated even on NICs that don't provide hardware support for these
stats: they are now updated in software. For the sake of consistency,
we also now have tx_bytes updated in software (hardware counters
include ethernet CRC, and software doesn't account for it).

This reverts parts of:
 - "forcedeth: statistics optimization" (9ee3d127a0)
 - "forcedeth: Improve stats counters" (b0c3cc97cc)
 - "forcedeth: remove unneeded stats updates" (81d7cc47fd)

Tested:
  pktgen + loopback (http://patchwork.ozlabs.org/patch/124698/)
  reports identical tx_packets/rx_packets and tx_bytes/rx_bytes.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/nvidia/forcedeth.c