Skip to contentSkip to conversation

count tg3 rx_discards stat for /proc/net/dev

PATCH In review Greg Banks 2 participants 2 messages May 12, 2004 – May 20, 2004

Subsystems (2)
lore
Share & tools
lore

Greg Banks

author
#0 lore raw

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
Index: linux/drivers/net/tg3.c
===================================================================
@@ -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.
#1 lore raw
Quoted 5 lines · On Wed, 12 May 2004 15:02:16 +1000 Greg Banks <[email protected]> wrote:

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.

I agree, nice patch, applied.