netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casey Leedom <leedom@chelsio.com>
To: netdev@vger.kernel.org
Subject: [PATCH net-next] cxgb4vf: Implement "Unhandled Interrupts" statistic
Date: Thu, 8 Jul 2010 11:07:44 -0700	[thread overview]
Message-ID: <201007081107.45287.leedom@chelsio.com> (raw)

>From 6c9cc1b5441afb32ecfcd10ac3060452e3c4df6f Mon Sep 17 00:00:00 2001
From: Casey Leedom <leedom@chelsio.com>
Date: Thu, 8 Jul 2010 10:05:48 -0700
Subject: [PATCH net-next] cxgb4vf: Implement "Unhandled Interrupts" statistic

Implement "Unhandled Interrupts" statistic so we can detect when the
hardware tells us that it things we have work to do but we don't find
anything ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
---
 drivers/net/cxgb4vf/cxgb4vf_main.c |    8 +++++---
 drivers/net/cxgb4vf/sge.c          |    3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index bd73ff5..e988031 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -1790,7 +1790,7 @@ static int sge_qstats_show(struct seq_file *seq, void *v)
 		  (rxq[qs].rspq.netdev
 		   ? rxq[qs].rspq.netdev->name
 		   : "N/A"));
-		R3("u", "RspQNullInts", rspq.unhandled_irqs);
+		R3("u", "RspQNullInts:", rspq.unhandled_irqs);
 		R("RxPackets:", stats.pkts);
 		R("RxCSO:", stats.rx_cso);
 		R("VLANxtract:", stats.vlan_ex);
@@ -1814,14 +1814,16 @@ static int sge_qstats_show(struct seq_file *seq, void *v)
 		const struct sge_rspq *evtq = &adapter->sge.fw_evtq;
 
 		seq_printf(seq, "%-8s %16s\n", "QType:", "FW event queue");
-		/* no real response queue statistics available to display */
+		seq_printf(seq, "%-16s %8u\n", "RspQNullInts:",
+			   evtq->unhandled_irqs);
 		seq_printf(seq, "%-16s %8u\n", "RspQ CIdx:", evtq->cidx);
 		seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", evtq->gen);
 	} else if (r == 1) {
 		const struct sge_rspq *intrq = &adapter->sge.intrq;
 
 		seq_printf(seq, "%-8s %16s\n", "QType:", "Interrupt Queue");
-		/* no real response queue statistics available to display */
+		seq_printf(seq, "%-16s %8u\n", "RspQNullInts:",
+			   intrq->unhandled_irqs);
 		seq_printf(seq, "%-16s %8u\n", "RspQ CIdx:", intrq->cidx);
 		seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", intrq->gen);
 	}
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index 3a7c02f..5c6663a 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -1776,6 +1776,9 @@ static int napi_rx_handler(struct napi_struct *napi, int budget)
 	} else
 		intr_params = QINTR_TIMER_IDX(SGE_TIMER_UPD_CIDX);
 
+	if (unlikely(work_done == 0))
+		rspq->unhandled_irqs++;
+
 	t4_write_reg(rspq->adapter,
 		     T4VF_SGE_BASE_ADDR + SGE_VF_GTS,
 		     CIDXINC(work_done) |
-- 
1.7.0.4


             reply	other threads:[~2010-07-08 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 18:07 Casey Leedom [this message]
2010-07-08 18:19 ` [PATCH net-next] cxgb4vf: Implement "Unhandled Interrupts" statistic Casey Leedom
2010-07-09  6:48 ` 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=201007081107.45287.leedom@chelsio.com \
    --to=leedom@chelsio.com \
    --cc=netdev@vger.kernel.org \
    /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).