From 00932678c6bbbe922a2790e59fd68b34719f3171 Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Wed, 23 Oct 2019 10:27:35 -0400 Subject: [PATCH] net/bnxt: fix mbuf free when clearing Tx queue When freeing pending transmit mbufs, use rte_pktmbuf_free_seg() instead of rte_pktmbuf_free(), otherwise linked mbufs may be freed more than once. Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code") Cc: stable@dpdk.org Reviewed-by: Ajit Khaparde Signed-off-by: Lance Richardson --- drivers/net/bnxt/bnxt_txq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index ebb9199d2d..6b866d4454 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -34,7 +34,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq) if (sw_ring) { for (i = 0; i < txq->tx_ring->tx_ring_struct->ring_size; i++) { if (sw_ring[i].mbuf) { - rte_pktmbuf_free(sw_ring[i].mbuf); + rte_pktmbuf_free_seg(sw_ring[i].mbuf); sw_ring[i].mbuf = NULL; } } -- 2.20.1