Skip to content
Commit 898bdf2c authored by david decotigny's avatar david decotigny Committed by David S. Miller
Browse files

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" (21828163)
 - "forcedeth: Improve stats counters" (0bdfea8b)
 - "forcedeth: remove unneeded stats updates" (4687f3f3)

Tested:
  pktgen + loopback (http://patchwork.ozlabs.org/patch/124698/

)
  reports identical tx_packets/rx_packets and tx_bytes/rx_bytes.

Signed-off-by: default avatarDavid Decotigny <david.decotigny@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77c1c7c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment