[PATCH] net/memif: fix descriptor flags corruption in multi-segment TX
Sriram Yagnaraman
sriram.yagnaraman at ericsson.com
Mon Mar 16 21:08:13 CET 2026
On Mon, 16 Mar 2026 09:08:45 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:
> Looks good, the AI review spotted one thing.
>
> Error: Asymmetric mbuf cleanup between the two Rx paths on truncation
Was this meant for the RX patch [1], not this TX patch?
The asymmetry is intentional. The fast path (mbuf_size >= bsize)
pre-allocates MAX_PKT_BURST mbufs via rte_pktmbuf_alloc_bulk() into a
local mbufs[] array, so on truncation we must free the unused portion
with rte_pktmbuf_free_bulk(mbufs + rx_pkts, MAX_PKT_BURST - rx_pkts).
The slow path (mbuf_size < bsize) allocates one mbuf at a time via
rte_pktmbuf_alloc() -- there is no batch array to clean up. Freeing
mbuf_head is sufficient.
[1] https://lore.kernel.org/dpdk-dev/20260316155918.3756017-1-sriram.yagnaraman@ericsson.com/
More information about the dev
mailing list