[dpdk-dev] [PATCH 4/4] examples/l3fwd: make data struct to be memory efficient

Ruifeng Wang Ruifeng.Wang at arm.com
Tue Apr 27 03:19:53 CEST 2021


> -----Original Message-----
> From: Walsh, Conor <conor.walsh at intel.com>
> Sent: Monday, April 26, 2021 6:55 PM
> To: hemant.agrawal at nxp.com; Jerin Jacob <jerinjacobk at gmail.com>;
> Ruifeng Wang <Ruifeng.Wang at arm.com>
> Cc: jerinj at marvell.com; Yigit, Ferruh <ferruh.yigit at intel.com>;
> thomas at monjalon.net; David Marchand <david.marchand at redhat.com>;
> dpdk-dev <dev at dpdk.org>; nd <nd at arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>
> Subject: RE: [dpdk-dev] [PATCH 4/4] examples/l3fwd: make data struct to be
> memory efficient
> 
> <snip>
> > >> There are some holes in data struct lcore_conf. The holes are due
> > >> to alignment requirement.
> > >>
> > >> For struct lcore_rx_queue, there is no need to make every element
> > >> of this type to be cache line aligned, because the data is not
> > >> shared between cores.
> > >>
> > >> Member len of struct mbuf_table can be moved out. So data can be
> > >> packed and there will be no need to load an extra cache line when
> > >> mbuf table is empty.
> > >>
> > >> The change showed slight performance improvement on N1SDP
> platform.
> > >>
> > >> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > >>
> > >> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > > This change alone is OK in the octeontx2 platform.(No difference in
> > performance)
> > > combining with 3/4 shows some regression. Probably is due to
> > > prefetch or 128B cache line tuning specifics.
> >
> > We checked it on Layerscape LS2088A platform. No difference for 1-2
> > core case. However observing ~2% regression for 4-8 cores.
> >
> > Regards,
> >
> > Hemant
> >
> 
> Hi Ruifeng,

Hi Conor,
> 
> l3fwd will no longer build with this patch as you have changed a struct used
> by the FIB lookup method.
> This patch will need to be updated to also update the FIB lookup method as
> you have done with EM and LPM.

Thanks for the comments.
I will provide v2 with updates. I'm considering to drop this one in v2 series.
> 
> Thanks,
> Conor.


More information about the dev mailing list