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: d256c73c11 ("net/bnxt: fix memory leak during queue restart")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
Rahul Gupta 2020-05-20 23:09:18 +05:30 committed by Ferruh Yigit
parent 1adaf0e0f2
commit 20cb28a0ec

View File

@ -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");