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 864DE1B2E0 for ; Fri, 19 Jan 2018 11:01:40 +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.89) (envelope-from ) id 1ecTUV-0001Fk-TM; Fri, 19 Jan 2018 11:01:45 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 19 Jan 2018 11:01:37 +0100 Date: Fri, 19 Jan 2018 11:01:37 +0100 From: Olivier Matz To: Hemant Agrawal Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, Pavan Nikhilesh Message-ID: <20180119100137.ezr44stykkb3udqc@platinum> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> <1516281992-6873-3-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516281992-6873-3-git-send-email-hemant.agrawal@nxp.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 2/7] eal: add API to set user default mbuf mempool ops 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: Fri, 19 Jan 2018 10:01:40 -0000 On Thu, Jan 18, 2018 at 06:56:27PM +0530, Hemant Agrawal wrote: > Add new API to set the user defined mbuf mempool ops name > i.e. set the provided ops name to `internal_config.mbuf_pool_ops_name`. > > Signed-off-by: Pavan Nikhilesh > Signed-off-by: Hemant Agrawal > --- > lib/librte_eal/bsdapp/eal/eal.c | 6 ++++++ > lib/librte_eal/common/include/rte_eal.h | 9 +++++++++ > lib/librte_eal/linuxapp/eal/eal.c | 6 ++++++ > lib/librte_eal/rte_eal_version.map | 1 + > 4 files changed, 22 insertions(+) > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index c602d02..64f010a 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -117,6 +117,12 @@ rte_eal_mbuf_default_mempool_ops(void) > return internal_config.user_mbuf_pool_ops_name; > } > > +void > +rte_eal_set_mbuf_user_mempool_ops(const char *ops_name) > +{ > + internal_config.user_mbuf_pool_ops_name = ops_name; > +} > + I think we should only have the "set" API in mbuf lib. What do you think about what I suggested in http://dpdk.org/ml/archives/dev/2018-January/087419.html ? """ The proper way is maybe to keep the parsing in eal, and at librte_mbuf initialization, query the eal library to get the user pool if any. After that, all will be managed inside librte_mbuf. So the eal lib will only do the argument parsing. """ In that case, this patch could be dropped. Please refer to my comment in patch 3 to see what other modifications would be needed.