]> git.baikalelectronics.ru Git - kernel.git/commit
s2io: resolve statistics issues
authorJon Mason <jon.mason@exar.com>
Fri, 2 Jul 2010 09:13:49 +0000 (09:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Jul 2010 05:27:25 +0000 (22:27 -0700)
commit217bb5a68617f198bee601063d11d7b13aea48d5
tree6e11ebe97981668ba06d538c44dc7c09a6c688a9
parent313990b35861a6d6b8eac9a44a88c733b2f0f8e5
s2io: resolve statistics issues

This patch resolves a number of issues in the statistics gathering of
the s2io driver.

On Xframe adapters, the received multicast statistics counter includes
pause frames which are not indicated to the driver.  This can cause
issues where the multicast packet count is higher than what has actually
been received, possibly higher than the number of packets received.

The driver software counters are replaced with the adapter hardware
statistics for rx_packets, rx_bytes, and tx_bytes.  It also uses the
overflow registers to determine if the statistics wrapped the 32bit
register (removing the window of having a statistic value less than the
previous call).  rx_length_errors statistic now includes undersized
packets in addition to oversized packets in its counting.  Finally,
rx_crc_errors are now being counted.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/s2io.c
drivers/net/s2io.h