[PATCH v2] mbuf: avoid temporary array for bulk free

Morten Brørup mb at smartsharesystems.com
Tue Sep 29 06:39:21 CEST 2026


> v2:

> - Cap same-pool runs at 64 to retain mempool-cache behavior.

NAK!
Why would you do that?

> - Move the sanity check after the chained-packet fallback decision.
> - Add mixed flat/chained and indirect-mbuf regression cases.
> - Remove the earlier timing claim; the capped version has not yet
>   been benchmarked on x86 or with a cached mempool.
> 
> +		run_count++;
> +		if (run_count == RTE_PKTMBUF_FREE_PENDING_SZ) {
> +			rte_mbuf_raw_free_bulk(run_pool,
> +					&mbufs[run_start], run_count);
> +			run_count = 0;
> +		}

NAK to this part.
Flushing a large bulk in smaller bulks of 64 mbufs is not necessary, and may reduce performance.



More information about the dev mailing list