From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 926402C17 for ; Thu, 7 Mar 2019 04:10:21 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2019 19:10:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,450,1544515200"; d="scan'208";a="152762474" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.206]) by fmsmga001.fm.intel.com with ESMTP; 06 Mar 2019 19:10:19 -0800 Date: Thu, 7 Mar 2019 11:07:12 +0800 From: Ye Xiaolong To: David Marchand Cc: dev , Qi Zhang , Olivier Matz Message-ID: <20190307030712.GA42685@intel.com> References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190301080947.91086-3-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v1 2/6] lib/mbuf: enable parse flags when create 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: , X-List-Received-Date: Thu, 07 Mar 2019 03:10:22 -0000 Hi David, Thanks for you comments. On 03/05, David Marchand wrote: >On Fri, Mar 1, 2019 at 9:13 AM Xiaolong Ye wrote: > >> This give the option that applicaiton can configure each >> memory chunk's size precisely. (by MEMPOOL_F_NO_SPREAD). >> >> Signed-off-by: Qi Zhang >> Signed-off-by: Xiaolong Ye >> > >Cc: maintainer > >--- >> lib/librte_mbuf/rte_mbuf.c | 15 ++++++++++++--- >> lib/librte_mbuf/rte_mbuf.h | 8 +++++++- >> 2 files changed, 19 insertions(+), 4 deletions(-) >> >> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c >> index 21f6f7404..0f6fcff28 100644 >> --- a/lib/librte_mbuf/rte_mbuf.c >> +++ b/lib/librte_mbuf/rte_mbuf.c >> @@ -110,7 +110,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, >> struct rte_mempool * >> rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n, >> unsigned int cache_size, uint16_t priv_size, uint16_t >> data_room_size, >> - int socket_id, const char *ops_name) >> + unsigned int flags, int socket_id, const char *ops_name) >> { >> struct rte_mempool *mp; >> struct rte_pktmbuf_pool_private mbp_priv; >> > >You can't do that, rte_pktmbuf_pool_create_by_ops is exposed to the user >apps and part of the ABI. >You must define a new internal fonction that takes this flag, keeps the >existing interface and add your new experimental api. > In this case, if I define a new function that takes the flag, it seems would have a lot of duplicated code with rte_pktmbuf_pool_create_by_ops, do you have any suggestions for better handling? Thanks, Xiaolong > >-- >David Marchand