Commit 68dc9d36 authored by Casey Leedom's avatar Casey Leedom Committed by David S. Miller

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: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fabc51a6
...@@ -1790,7 +1790,7 @@ static int sge_qstats_show(struct seq_file *seq, void *v) ...@@ -1790,7 +1790,7 @@ static int sge_qstats_show(struct seq_file *seq, void *v)
(rxq[qs].rspq.netdev (rxq[qs].rspq.netdev
? rxq[qs].rspq.netdev->name ? rxq[qs].rspq.netdev->name
: "N/A")); : "N/A"));
R3("u", "RspQNullInts", rspq.unhandled_irqs); R3("u", "RspQNullInts:", rspq.unhandled_irqs);
R("RxPackets:", stats.pkts); R("RxPackets:", stats.pkts);
R("RxCSO:", stats.rx_cso); R("RxCSO:", stats.rx_cso);
R("VLANxtract:", stats.vlan_ex); R("VLANxtract:", stats.vlan_ex);
...@@ -1814,14 +1814,16 @@ static int sge_qstats_show(struct seq_file *seq, void *v) ...@@ -1814,14 +1814,16 @@ static int sge_qstats_show(struct seq_file *seq, void *v)
const struct sge_rspq *evtq = &adapter->sge.fw_evtq; const struct sge_rspq *evtq = &adapter->sge.fw_evtq;
seq_printf(seq, "%-8s %16s\n", "QType:", "FW event queue"); 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 CIdx:", evtq->cidx);
seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", evtq->gen); seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", evtq->gen);
} else if (r == 1) { } else if (r == 1) {
const struct sge_rspq *intrq = &adapter->sge.intrq; const struct sge_rspq *intrq = &adapter->sge.intrq;
seq_printf(seq, "%-8s %16s\n", "QType:", "Interrupt Queue"); 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 CIdx:", intrq->cidx);
seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", intrq->gen); seq_printf(seq, "%-16s %8u\n", "RspQ Gen:", intrq->gen);
} }
......
...@@ -1772,6 +1772,9 @@ static int napi_rx_handler(struct napi_struct *napi, int budget) ...@@ -1772,6 +1772,9 @@ static int napi_rx_handler(struct napi_struct *napi, int budget)
} else } else
intr_params = QINTR_TIMER_IDX(SGE_TIMER_UPD_CIDX); intr_params = QINTR_TIMER_IDX(SGE_TIMER_UPD_CIDX);
if (unlikely(work_done == 0))
rspq->unhandled_irqs++;
t4_write_reg(rspq->adapter, t4_write_reg(rspq->adapter,
T4VF_SGE_BASE_ADDR + SGE_VF_GTS, T4VF_SGE_BASE_ADDR + SGE_VF_GTS,
CIDXINC(work_done) | CIDXINC(work_done) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment