[PATCH 1/3] net/bnxt: defer completion index update
Ruifeng Wang
ruifeng.wang at arm.com
Wed Apr 13 12:31:54 CEST 2022
When no packet is received, there is no need to update completion raw cons.
Moved update down to remove unnecessary store in this case.
Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
drivers/net/bnxt/bnxt_rxr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 5a9cf48e67..49b9f0aed4 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1096,7 +1096,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
break;
}
- cpr->cp_raw_cons = raw_cons;
if (!nb_rx_pkts && !nb_rep_rx_pkts && !evt) {
/*
* For PMD, there is no need to keep on pushing to REARM
@@ -1105,6 +1104,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
goto done;
}
+ cpr->cp_raw_cons = raw_cons;
/* Ring the completion queue doorbell. */
bnxt_db_cq(cpr);
--
2.25.1
More information about the dev
mailing list