Skip to content

Commit

Permalink
cxgb4vf: Implement "Unhandled Interrupts" statistic
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Casey Leedom authored and David S. Miller committed Jul 9, 2010
1 parent fabc51a commit 68dc9d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/cxgb4vf/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,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) |
Expand Down

0 comments on commit 68dc9d3

Please sign in to comment.