[PATCH v10 1/6] net/null: fix missing mbuf leakage in the copy transmit

Stephen Hemminger stephen at networkplumber.org
Sun Feb 1 18:17:32 CET 2026


The transmit variant that copies the data into the dummy packet
is missing calling free. Looks like a regression got introduced
when optimizing the transmit logic to do bulk free.

Fixes: 9946ba548bf8 ("net/null: optimize Tx")
Cc: stable at dpdk.org

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/null/rte_eth_null.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 46e7e7bd8c..0931dac12e 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -172,6 +172,7 @@ eth_null_copy_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 		rte_memcpy(h->dummy_packet, rte_pktmbuf_mtod(m, void *), len);
 		bytes += m->pkt_len;
 	}
+	rte_pktmbuf_free_bulk(bufs, nb_bufs);
 
 	rte_atomic_fetch_add_explicit(&h->tx_pkts, nb_bufs, rte_memory_order_relaxed);
 	rte_atomic_fetch_add_explicit(&h->tx_bytes, bytes, rte_memory_order_relaxed);
-- 
2.51.0



More information about the stable mailing list