Page MenuHomeFreeBSD

D58613.diff
No OneTemporary

D58613.diff

diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
--- a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
+++ b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c
@@ -115,7 +115,7 @@
DEFINE_MUTEX(tmp_mutex); /* mutex lock for driver */
extern void bnxt_fw_reset(struct bnxt_softc *bp);
extern void bnxt_queue_sp_work(struct bnxt_softc *bp);
-extern void
+extern bool
process_nq(struct bnxt_softc *softc, uint16_t nqid);
/*
* We want to create:
diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c
--- a/sys/dev/bnxt/bnxt_en/if_bnxt.c
+++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c
@@ -202,7 +202,7 @@
SLIST_HEAD(softc_list, bnxt_softc_list) pf_list;
int bnxt_num_pfs = 0;
-void
+bool
process_nq(struct bnxt_softc *softc, uint16_t nqid);
static void *bnxt_register(device_t dev);
@@ -4385,7 +4385,7 @@
}
}
-void
+bool
process_nq(struct bnxt_softc *softc, uint16_t nqid)
{
struct bnxt_cp_ring *cpr = &softc->nq_rings[nqid];
@@ -4396,6 +4396,7 @@
uint32_t cons = cpr->cons;
uint32_t raw_cons = cpr->raw_cons;
uint16_t nq_type, nqe_cnt = 0;
+ bool rx_cqe = false;
while (1) {
if (!NQ_VALID(&cmp[cons], v_bit)) {
@@ -4409,6 +4410,7 @@
} else {
tx_cpr->toggle = NQE_CN_TOGGLE(cmp[cons].type);
rx_cpr->toggle = NQE_CN_TOGGLE(cmp[cons].type);
+ rx_cqe = true;
}
NEXT_CP_CONS_V(&cpr->ring, cons, v_bit);
@@ -4421,6 +4423,8 @@
cpr->raw_cons = raw_cons;
cpr->v_bit = v_bit;
}
+
+ return rx_cqe;
}
static int
@@ -4429,10 +4433,14 @@
struct bnxt_softc *softc = iflib_get_softc(ctx);
if (BNXT_CHIP_P5_PLUS(softc)) {
- process_nq(softc, qid);
+ bool ret = false;
+ ret = process_nq(softc, qid);
softc->db_ops.bnxt_db_nq(&softc->nq_rings[qid], 1);
- }
- softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1);
+ if (ret)
+ softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1);
+ } else
+ softc->db_ops.bnxt_db_rx_cq(&softc->rx_cp_rings[qid], 1);
+
return 0;
}

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 12, 6:51 PM (14 m, 25 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40693811
Default Alt Text
D58613.diff (1 KB)

Event Timeline