* [PATCH] count tg3 rx_discards stat for /proc/net/dev
@ 2004-05-12 5:02 Greg Banks
2004-05-20 4:16 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Greg Banks @ 2004-05-12 5:02 UTC (permalink / raw)
To: David S. Miller, Linux Network Development list
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.
Index: linux/drivers/net/tg3.c
===================================================================
--- linux.orig/drivers/net/tg3.c Wed May 12 12:15:11 2004
+++ linux/drivers/net/tg3.c Wed May 12 12:17:42 2004
@@ -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.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] count tg3 rx_discards stat for /proc/net/dev
2004-05-12 5:02 [PATCH] count tg3 rx_discards stat for /proc/net/dev Greg Banks
@ 2004-05-20 4:16 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-05-20 4:16 UTC (permalink / raw)
To: Greg Banks; +Cc: netdev
On Wed, 12 May 2004 15:02:16 +1000
Greg Banks <gnb@melbourne.sgi.com> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-20 4:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-12 5:02 [PATCH] count tg3 rx_discards stat for /proc/net/dev Greg Banks
2004-05-20 4:16 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).