[dpdk-dev] rte_mbuf.next in 2nd cacheline

Ananyev, Konstantin konstantin.ananyev at intel.com
Mon Jun 15 20:34:13 CEST 2015



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Monday, June 15, 2015 5:23 PM
> To: Ananyev, Konstantin
> Cc: Olivier MATZ; dev at dpdk.org; Damjan Marion (damarion)
> Subject: Re: [dpdk-dev] rte_mbuf.next in 2nd cacheline
> 
> On Mon, Jun 15, 2015 at 05:10:44PM +0100, Ananyev, Konstantin wrote:
> >
> >
> > > -----Original Message-----
> > > From: Richardson, Bruce
> > > Sent: Monday, June 15, 2015 5:02 PM
> > > To: Ananyev, Konstantin
> > > Cc: Olivier MATZ; dev at dpdk.org; Damjan Marion (damarion)
> > > Subject: Re: [dpdk-dev] rte_mbuf.next in 2nd cacheline
> > >
> > > On Mon, Jun 15, 2015 at 04:59:55PM +0100, Ananyev, Konstantin wrote:
> > > >
> > > >
> > > >
> > > > As I can see, vector TX is the only one that calls __rte_pktmbuf_prefree_seg() directly.
> > > > All others use rte_pktmbuf_free_seg(), that does ' m->next = NULL' anyway.
> > > > For vector TX - yes, need to verify that it would not introduce a slowdown.
> > > > Konstantin
> > > >
> > >
> > > But if the function is only directly called from one place, and that doesn't
> > > have a problem, why would we bother making any change at all?
> >
> >
> > For future usages?
> > But sure, if you believe that we can safely remove 'm->next = NULL' at RX path,
> > without any changes in the __rte_pktmbuf_prefree_seg() -
> > that seems fine to me.
> > Konstantin
> >
> 
> If we find it's not safe, we can add in the change to __rte_pktmbuf_prefree_seg
> as you suggest.
> 
> One other question: based on this, do you think it's safe to also remove the
> assignment to NULL from the pktmbuf_alloc function? I suspect it should be safe, and
> that should help any traffic-generator type applications that use that function
> extensively.

So it will be setup to NULL, either by:
- mbuf constructor.
- TX full-path free descriptors code.
- upper layer code that uses 'next' pointer explicitly.
?

I can't come-up with some breakage scenario off-hand.
But that means that we have to should avoid resetting tx_offload in pktmbuf_alloc() too, right?
Otherwise there probably wouldn't be any real gain.
Konstantin

> 
> /Bruce




More information about the dev mailing list