[PATCH v8 3/3] mbuf: optimize reset of reinitialized mbufs

Stephen Hemminger stephen at networkplumber.org
Sat Aug 23 16:28:29 CEST 2025


On Sat, 23 Aug 2025 06:30:02 +0000
Morten Brørup <mb at smartsharesystems.com> wrote:

> An optimized function for resetting a bulk of newly allocated
> reinitialized mbufs (a.k.a. raw mbufs) was added.
> 
> Compared to the normal packet mbuf reset function, it takes advantage of
> the following two details:
> 1. The 'next' and 'nb_segs' fields are already reset, so resetting them
> has been omitted.

This doesn't matter, since they are on the same cache line the
operation of touching them costs nothing.


More information about the dev mailing list