From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id EC21B293B for ; Tue, 12 Dec 2017 15:21:48 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eOlXR-00047K-HL; Tue, 12 Dec 2017 15:28:07 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Tue, 12 Dec 2017 15:21:41 +0100 Date: Tue, 12 Dec 2017 15:21:41 +0100 From: Olivier MATZ To: Jerin Jacob Cc: dev@dpdk.org, santosh.shukla@caviumnetworks.com Message-ID: <20171212142139.ytnyryjh3ekwhuyb@platinum> References: <20171117180703.4085-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171117180703.4085-1-jerin.jacob@caviumnetworks.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 14:21:49 -0000 Hi Jerin, On Fri, Nov 17, 2017 at 11:37:03PM +0530, Jerin Jacob wrote: > Use of rte_eal_mbuf_default_mempool_ops() API will > allow to override pool handler through "--mbuf-pool-ops-name" > eal command line argument. > > Signed-off-by: Jerin Jacob > --- > test/test/test_mempool.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c > index 37ead503b..46eb5ce06 100644 > --- a/test/test/test_mempool.c > +++ b/test/test/test_mempool.c > @@ -565,7 +565,7 @@ test_mempool(void) > > /* Create a mempool based on Default handler */ > printf("Testing %s mempool handler\n", > - RTE_MBUF_DEFAULT_MEMPOOL_OPS); > + rte_eal_mbuf_default_mempool_ops()); > default_pool = rte_mempool_create_empty("default_pool", > MEMPOOL_SIZE, > MEMPOOL_ELT_SIZE, > @@ -577,7 +577,7 @@ test_mempool(void) > goto err; > } > if (rte_mempool_set_ops_byname(default_pool, > - RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) { > + rte_eal_mbuf_default_mempool_ops(), NULL) < 0) { > printf("cannot set %s handler\n", > RTE_MBUF_DEFAULT_MEMPOOL_OPS); The error printf should also be modified (there is another one below). Since all uses are in the same function, it's worth putting it in a local variable. Regards, Olivier