From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E573BA0487 for ; Fri, 5 Jul 2019 17:50:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E92E81B9F1; Fri, 5 Jul 2019 17:50:19 +0200 (CEST) Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id E8C5F1B9DF for ; Fri, 5 Jul 2019 17:50:17 +0200 (CEST) Received: from lfbn-lil-1-176-160.w90-45.abo.wanadoo.fr ([90.45.26.160] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjQWQ-0005Cd-Uv; Fri, 05 Jul 2019 17:53:16 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 05 Jul 2019 17:50:07 +0200 Date: Fri, 5 Jul 2019 17:50:07 +0200 From: Olivier Matz To: Harman Kalra Cc: "reshma.pattan@intel.com" , "thomas@monjalon.net" , "arybchenko@solarflare.com" , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Message-ID: <20190705155007.mvw5fktyyf4xddal@platinum> References: <1571664.Xf5ZK7gnes@xps> <1562341193-19641-1-git-send-email-hkalra@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1562341193-19641-1-git-send-email-hkalra@marvell.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2] app/pdump: enforcing pdump to use sw mempool 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" hi, On Fri, Jul 05, 2019 at 03:40:20PM +0000, Harman Kalra wrote: > A secondary process cannot access HW mempool already > initiazed by primary, and neither it can setup its own > HW mempool due to its own restrictions. > > Since dpdk-pdump creates mempool for managing its local > mbufs, SW mempool is capable enough to solve this purpose. > > Signed-off-by: Harman Kalra > --- > app/pdump/main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/app/pdump/main.c b/app/pdump/main.c > index 80dc924cf..c739ae43d 100644 > --- a/app/pdump/main.c > +++ b/app/pdump/main.c > @@ -604,11 +604,12 @@ create_mp_ring_vdev(void) > mbuf_pool = rte_mempool_lookup(mempool_name); > if (mbuf_pool == NULL) { > /* create mempool */ > - mbuf_pool = rte_pktmbuf_pool_create(mempool_name, > + mbuf_pool = rte_pktmbuf_pool_create_by_ops(mempool_name, > pt->total_num_mbufs, > MBUF_POOL_CACHE_SIZE, 0, > pt->mbuf_data_size, > - rte_socket_id()); > + rte_socket_id(), > + RTE_MBUF_DEFAULT_MEMPOOL_OPS); > if (mbuf_pool == NULL) { > cleanup_rings(); > rte_exit(EXIT_FAILURE, > -- > 2.18.0 > Did you see the comment in my previous mail? """ I think it would be safer to use "ring_mp_mc" instead of CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS, because the latter could be overriden on a specific platform. """ Thanks, Olivier