[dpdk-dev] [PATCH 3/3] app/testpmd: set preferred mempool as default pktpool

Lu, Wenzhuo wenzhuo.lu at intel.com
Tue Jan 16 07:06:50 CET 2018


Hi Pavan,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pavan Nikhilesh
> Sent: Thursday, December 14, 2017 3:56 AM
> To: jerin.jacob at caviumnetworks.com; Wu, Jingjing <jingjing.wu at intel.com>;
> Richardson, Bruce <bruce.richardson at intel.com>; hemant.agrawal at nxp.com;
> Yigit, Ferruh <ferruh.yigit at intel.com>; thomas at monjalon.net;
> olivier.matz at 6wind.com
> Cc: dev at dpdk.org; Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 3/3] app/testpmd: set preferred mempool as
> default pktpool
> 
> Set the mempool preferred by the ethernet devices as default mbuf
> mempool before creating the pktpool.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> ---
>  app/test-pmd/testpmd.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> c3ab44849..bfea35613 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -533,6 +533,8 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned
> nb_mbuf,
>  		rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL);
>  	} else {
>  		/* wrapper to rte_mempool_create() */
> +		RTE_LOG(INFO, USER1, "preferred mempool ops %s
> selected\n",
> +				rte_eth_dev_get_preferred_pool_name(1));
This '1'  looks like hardcode. May I suggest to change it to 'true'?


More information about the dev mailing list