From 20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065 Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Wed, 20 May 2020 23:09:18 +0530 Subject: [PATCH] net/bnxt: fix Rx ring producer index When a queue is started after deferred_start, then increment raw_prod irrespective of new mbuf is allocated or old mbufs are used. Fixes: d256c73c1122 ("net/bnxt: fix memory leak during queue restart") Cc: stable@dpdk.org Signed-off-by: Rahul Gupta Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index d2955bae3c..ee1acb1969 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -987,9 +987,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) rxq->queue_id, i, ring->ring_size); break; } - rxr->rx_prod = prod; - prod = RING_NEXT(rxr->rx_ring_struct, prod); } + rxr->rx_prod = prod; + prod = RING_NEXT(rxr->rx_ring_struct, prod); } ring = rxr->ag_ring_struct; @@ -1005,9 +1005,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) rxq->queue_id, i, ring->ring_size); break; } - rxr->ag_prod = prod; - prod = RING_NEXT(rxr->ag_ring_struct, prod); } + rxr->ag_prod = prod; + prod = RING_NEXT(rxr->ag_ring_struct, prod); } PMD_DRV_LOG(DEBUG, "AGG Done!\n"); -- 2.20.1