From: David Decotigny <decot@google.com>
To: "David S. Miller" <davem@davemloft.net>,
Joe Perches <joe@perches.com>, Szymon Janc <szymon@janc.net.pl>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kernel-net-upstream@google.com, Sameer Nanda <snanda@google.com>,
David Decotigny <decot@google.com>
Subject: [PATCH] forcedeth: new ethtool stat "tx_timeout" to account for tx_timeouts
Date: Wed, 18 May 2011 14:09:05 -0700 [thread overview]
Message-ID: <1305752945-14843-2-git-send-email-decot@google.com> (raw)
In-Reply-To: <1305752945-14843-1-git-send-email-decot@google.com>
From: Sameer Nanda <snanda@google.com>
This change publishes a new ethtool stats: tx_timeout that counts the
number of times the tx_timeout callback was triggered.
Signed-off-by: David Decotigny <decot@google.com>
---
drivers/net/forcedeth.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 895471d..112dc0b 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -632,6 +632,7 @@ static const struct nv_ethtool_str nv_estats_str[] = {
{ "rx_packets" },
{ "rx_errors_total" },
{ "tx_errors_total" },
+ { "tx_timeout" },
/* version 2 stats */
{ "tx_deferral" },
@@ -672,6 +673,7 @@ struct nv_ethtool_stats {
u64 rx_packets;
u64 rx_errors_total;
u64 tx_errors_total;
+ u64 tx_timeout;
/* version 2 stats */
u64 tx_deferral;
@@ -2526,6 +2528,8 @@ static void nv_tx_timeout(struct net_device *dev)
spin_lock_irq(&np->lock);
+ np->estats.tx_timeout++;
+
/* 1) stop tx engine */
nv_stop_tx(dev);
--
1.7.3.1
next prev parent reply other threads:[~2011-05-18 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 21:09 [PATCH] forcedeth: Improve stats counters David Decotigny
2011-05-18 21:09 ` David Decotigny [this message]
2011-05-18 21:14 ` [PATCH] forcedeth: new ethtool stat "tx_timeout" to account for tx_timeouts David Miller
2011-05-18 21:20 ` David Decotigny
2011-05-18 21:26 ` David 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=1305752945-14843-2-git-send-email-decot@google.com \
--to=decot@google.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=kernel-net-upstream@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=snanda@google.com \
--cc=szymon@janc.net.pl \
/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 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).