[dpdk-dev] [RFC 0/8] mbuf: structure reorganization

Ananyev, Konstantin konstantin.ananyev at intel.com
Mon Feb 20 00:45:53 CET 2017


Hi Olivier,

> 
> > > - m->next, m->nb_segs, and m->refcnt are always initialized for
> > > mbufs in the pool, avoiding the need of setting m->next (located in
> > > the 2nd cache line) in the Rx path for mono-segment packets.
> > > - change port and nb_segs to 16 bits
> >
> > Not that I am completely against it,
> > but changing nb_segs to 16 bits seems like an overkill to me.
> > I think we can keep and extra 8bits for something more useful in
> > future.
> 
> In my case, I use the m->next field to chain more than 256 segments for
> L4 socket buffers. It also updates nb_seg that can overflow. It's not
> a big issue since at the end, nb_seg is decremented for each segment.
> On the other hand, if I enable some sanity checks on mbufs, it
> complains because the number of segments is not equal to nb_seg.

I still have a hard time imaging some practical use-case for packet
that spawns over 256 segments.
But might that is just my poor imagination, so ok  if you guys believe
there are some real-world use cases - I wouldn't object here.
Konstantin



More information about the dev mailing list