From: Greg Banks <gnb@melbourne.sgi.com>
To: "David S. Miller" <davem@redhat.com>,
Linux Network Development list <netdev@oss.sgi.com>
Subject: [PATCH] count tg3 rx_discards stat for /proc/net/dev
Date: Wed, 12 May 2004 15:02:16 +1000 [thread overview]
Message-ID: <40A1AFD8.D5593759@melbourne.sgi.com> (raw)
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.
next reply other threads:[~2004-05-12 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-12 5:02 Greg Banks [this message]
2004-05-20 4:16 ` [PATCH] count tg3 rx_discards stat for /proc/net/dev David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40A1AFD8.D5593759@melbourne.sgi.com \
--to=gnb@melbourne.sgi.com \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.