count tg3 rx_discards stat for /proc/net/dev
Subsystems (2)
PATCH 1/1 count tg3 rx_discards stat for /proc/net/dev
G'day,
This small patch makes the rx_discards stat count towards the receive error count visible in /proc/net/dev and thus in the output of ifconfig. This stat is rarely non-zero unless you use multiple cards on the same PCI bus under heavy load; but when it does happen you really want to know about it.
drivers/net/tg3.c +2 -1
@@ -5701,7 +5701,8 @@get_stat64 (&hw_stats->tx_octets); stats->rx_errors = old_stats->rx_errors + -get_stat64 (&hw_stats->rx_errors); +get_stat64 (&hw_stats->rx_errors) + +get_stat64 (&hw_stats->rx_discards); stats->tx_errors = old_stats->tx_errors +get_stat64 (&hw_stats->tx_errors) + get_stat64(&hw_stats->tx_mac_errors) +
Greg.
Signature · 2 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI.
Quoted 5 lines · On Wed, 12 May 2004 15:02:16 +1000 Greg Banks <[email protected]> wrote:
This small patch makes the
rx_discardsstat count towards the receive error count visible in/proc/net/devand thus in the output of ifconfig. This stat is rarely non-zero unless you use multiple cards on the same PCI bus under heavy load; but when it does happen you really want to know about it.
I agree, nice patch, applied.