DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix mbuf free when clearing Tx queue
@ 2019-10-23 14:27 Lance Richardson
  2019-10-23 15:40 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2019-10-23 14:27 UTC (permalink / raw)
  To: dev; +Cc: ajit.khaparde, ferruh.yigit, Lance Richardson

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")
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
---
 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 ebb9199d2..6b866d445 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.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-23 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 14:27 [dpdk-dev] [PATCH] net/bnxt: fix mbuf free when clearing Tx queue Lance Richardson
2019-10-23 15:40 ` Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).