From c8da9163bf920c7b494ae119069e07be688bacf7 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Sun, 14 May 2017 09:07:13 +0000 Subject: [PATCH] cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. MFC after: 3 days. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index a0ccb52c2829..f86c800e4807 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -969,6 +969,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count));