net/bnxt: fix mem zone free for Tx and Rx rings
PATCH 1/1 net/bnxt: fix mem zone free for Tx and Rx rings
The device cleanup logic was freeing most of the ring related memory, but was not freeing up the mem zone associated with the rings. This patch fixes the issue.
Fixes 2eb53b134aae ("net/bnxt: add initial Rx code")
Fixes 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by Ajit Khaparde <[email protected]>
Reviewed-by Lance Richardson <[email protected]>
Reviewed-by Somnath Kotur <[email protected]>
--- drivers/net/bnxt/bnxt_rxr.c | 3 +++ drivers/net/bnxt/bnxt_txr.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/net/bnxt/bnxt_rxr.c +3 -0
@@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)rte_free (rxq->cp_ring->cp_ring_struct);rte_free (rxq->cp_ring); +rte_memzone_free (rxq->mz); + rxq->mz =NULL ; +rte_free (rxq); bp->rx_queues[i] =NULL ; }
drivers/net/bnxt/bnxt_txr.c +3 -0
@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)rte_free (txq->cp_ring->cp_ring_struct);rte_free (txq->cp_ring); +rte_memzone_free (txq->mz); + txq->mz =NULL ; +rte_free (txq); bp->tx_queues[i] =NULL ; }
Signature · 1 line
2.30.1 (Apple Git-130)
Quoted 5 lines · Ajit Khaparde
The device cleanup logic was freeing most of the ring related memory, but was not freeing up the mem zone associated with the rings. This patch fixes the issue.
Quoted 7 lines
Fixes 2eb53b134aae ("net/bnxt: add initial Rx code")Fixes 6eb3cc2294fd ("net/bnxt: add initial Tx code")Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Lance Richardson <[email protected]>Reviewed-by Somnath Kotur <[email protected]>
Patch applied to dpdk-next-net-brcm.
Quoted 36 lines
--- drivers/net/bnxt/bnxt_rxr.c | 3 +++ drivers/net/bnxt/bnxt_txr.c | 3 +++ 2 files changed, 6 insertions(+)drivers/net/bnxt/bnxt_rxr.c +3
-0@@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)rte_free (rxq->cp_ring->cp_ring_struct);rte_free (rxq->cp_ring); +rte_memzone_free (rxq->mz); + rxq->mz =NULL ; +rte_free (rxq); bp->rx_queues[i] =NULL ; }drivers/net/bnxt/bnxt_txr.c +3
-1@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)rte_free (txq->cp_ring->cp_ring_struct);rte_free (txq->cp_ring); +rte_memzone_free (txq->mz); + txq->mz =NULL ; +rte_free (txq); bp->tx_queues[i] =NULL ; } --2.30.1 (Apple Git-130)