On Mon, 16 Mar 2026 09:08:45 -0700 Stephen Hemminger <[email protected]> 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/[email protected]/

