[03/10] net/cnxk: fix extbuf handling for multisegment packet

Message ID 20240517074448.3146611-3-ndabilpuram@marvell.com (mailing list archive)
State Changes Requested
Delegated to: Jerin Jacob
Headers
Series [01/10] common/cnxk: sync VF root weight with kernel |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram May 17, 2024, 7:44 a.m. UTC
  From: Rakesh Kudurumalla <rkudurumalla@marvell.com>

Avoid double free of extbuf when during TX path in
multisegmented packet with extbuf as one of segment.

Fixes: dd9446991212 ("net/cnxk: add transmit completion handler")
Cc: stable@dpdk.org

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn9k_tx.h | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 6fc9e4d758..b56881c561 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -117,6 +117,7 @@  cn9k_nix_prefree_seg(struct rte_mbuf *m, struct rte_mbuf **extm, struct cn9k_eth
 			send_hdr->w1.sqe_id = sqe_id &
 				txq->tx_compl.nb_desc_mask;
 			txq->tx_compl.ptr[send_hdr->w1.sqe_id] = m;
+			m->next = NULL;
 		}
 		return 1;
 	} else {