[PATCH] mbuf: optimize detach direct buffer
Bruce Richardson
bruce.richardson at intel.com
Mon Jan 5 11:31:43 CET 2026
On Sat, Jan 03, 2026 at 05:40:54PM +0000, Morten Brørup wrote:
> When rte_pktmbuf_prefree_seg() resets an mbuf about to be freed, it
> doesn't write the fields that already have the required values. This
> saves a memory store operation when all the fields already have the
> required values.
>
> This patch adds the same optimization to __rte_pktmbuf_free_direct(),
> to improve the performance for freeing a direct buffer being detached from
> a packet mbuf, i.e. saving a memory store operation when all the fields
> (of the buffer being freed) already have the required values.
>
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> ---
> lib/mbuf/rte_mbuf.h | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list