]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
forcedeth: Improve stats counters
authorMandeep Baines <msb@google.com>
Sat, 5 Nov 2011 14:38:23 +0000 (14:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2011 18:31:24 +0000 (13:31 -0500)
commit0bdfea8ba856826f5901fda608013f323c87f661
tree8527b969d9e27d5f2ded73c643dc79c0c7dd4433
parent4687f3f364a1d5b2df815a8c58a763cab57724e8
forcedeth: Improve stats counters

Rx byte count was off; instead use the hardware's count.  Tx packet
count was counting pre-TSO packets; instead count on-the-wire packets.
Report hardware dropped frame count as rx_fifo_errors.

- The count of transmitted packets reported by the forcedeth driver
  reports pre-TSO (TCP Segmentation Offload) packet counts and not the
  count of the number of packets sent on the wire. This change fixes
  the forcedeth driver to report the correct count. Fixed the code by
  copying the count stored in the NIC H/W to the value reported by the
  driver.

- Count rx_drop_frame errors as rx_fifo_errors:
  We see a lot of rx_drop_frame errors if we disable the rx bottom-halves
  for too long.  Normally, rx_fifo_errors would be counted in this case.
  The rx_drop_frame error count is private to forcedeth and is not
  reported by ifconfig or sysfs.  The rx_fifo_errors count is currently
  unused in the forcedeth driver.  It is reported by ifconfig as overruns.
  This change reports rx_drop_frame errors as rx_fifo_errors.

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