[1/3] net/bnxt: defer completion index update
Checks
Commit Message
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@arm.com>
---
drivers/net/bnxt/bnxt_rxr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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);