[dpdk-dev] [PATCH] app/testpmd: Optimize membuf pool allocation

Phil Yang (Arm Technology China) Phil.Yang at arm.com
Wed Sep 12 03:59:29 CEST 2018


Hi Bernard,

Thanks for you comments. I have updated the patch. Please review it.

Thanks,
Phil Yang

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Iremonger, Bernard
> Sent: Wednesday, September 12, 2018 12:23 AM
> To: dev <dev-bounces at dpdk.org>; dev at dpdk.org
> Cc: nd <nd at arm.com>; Gavin Hu (Arm Technology China) <Gavin.Hu at arm.com>
> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: Optimize membuf pool allocation
> 
> Hi Gavin,
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org]
> > Sent: Monday, August 27, 2018 10:33 AM
> > To: dev at dpdk.org
> > Cc: nd at arm.com; gavin.hu at arm.com
> > Subject: [dpdk-dev] [PATCH] app/testpmd: Optimize membuf pool
> > allocation
> >
> > By default, testpmd will create membuf pool for all NUMA nodes and
> > ignore EAL configuration.
> >
> > Count the number of available NUMA according to EAL core mask or core
> > list configuration. Optimized by only creating membuf pool for those nodes.
> >
> > Fixes: d5aeab6542f ("app/testpmd: fix mempool creation by socket id")
> >
> > Signed-off-by: Phil Yang <phil.yang at arm.com>
> > ---
> >  app/test-pmd/testpmd.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> > ee48db2..a56af2b 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -476,6 +476,8 @@ set_default_fwd_lcores_config(void)
> >
> >  	nb_lc = 0;
> >  	for (i = 0; i < RTE_MAX_LCORE; i++) {
> > +		if (!rte_lcore_is_enabled(i))
> > +			continue;
> >  		sock_num = rte_lcore_to_socket_id(i);
> >  		if (new_socket_id(sock_num)) {
> >  			if (num_sockets >= RTE_MAX_NUMA_NODES) { @@ -
> > 485,8 +487,6 @@ set_default_fwd_lcores_config(void)
> >  			}
> >  			socket_ids[num_sockets++] = sock_num;
> >  		}
> > -		if (!rte_lcore_is_enabled(i))
> > -			continue;
> >  		if (i == rte_get_master_lcore())
> >  			continue;
> >  		fwd_lcores_cpuids[nb_lc++] = i;
> > --
> > 2.7.4
> 
> ./dpdk/devtools/check-git-log.sh -1
> 
> Wrong headline uppercase:
>         app/testpmd: Optimize membuf pool allocation Wrong 'Fixes' reference:
>         Fixes: d5aeab6542f ("app/testpmd: fix mempool creation by socket id")
> 
> Regards,
> 
> Bernard.
> 



More information about the dev mailing list