From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v2 4/5] mbuf: pktmbuf pool create helper for specific mempool ops Date: Mon, 15 Jan 2018 18:01:33 +0530 Message-ID: <20180115123132.GB833@jerin> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-5-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com To: Hemant Agrawal Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0074.outbound.protection.outlook.com [104.47.41.74]) by dpdk.org (Postfix) with ESMTP id D3F51322C for ; Mon, 15 Jan 2018 13:31:54 +0100 (CET) Content-Disposition: inline In-Reply-To: <1515996674-26338-5-git-send-email-hemant.agrawal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Mon, 15 Jan 2018 11:41:13 +0530 > From: Hemant Agrawal > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, > santosh.shukla@caviumnetworks.com > Subject: [PATCH v2 4/5] mbuf: pktmbuf pool create helper for specific > mempool ops > X-Mailer: git-send-email 2.7.4 > > Introduce a new helper for pktmbuf pool, which will allow > the application to optionally specify the mempool ops name > as well. > > Signed-off-by: Hemant Agrawal > --- > lib/librte_mbuf/rte_mbuf.c | 23 ++++++++++++++------ > lib/librte_mbuf/rte_mbuf.h | 42 ++++++++++++++++++++++++++++++++++++ > lib/librte_mbuf/rte_mbuf_version.map | 1 + > 3 files changed, 60 insertions(+), 6 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index fd3b6f5..482676c 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -186,15 +186,15 @@ rte_mbuf_best_mempool_ops(void) > return RTE_MBUF_DEFAULT_MEMPOOL_OPS; > } > > -/* helper to create a mbuf pool */ > +/* helper to create a mbuf pool with given mempool ops*/ > struct rte_mempool * > -rte_pktmbuf_pool_create(const char *name, unsigned n, > - unsigned cache_size, uint16_t priv_size, uint16_t data_room_size, > - int socket_id) > +rte_pktmbuf_pool_create_specific(const char *name, unsigned int n, No strong opinion on name. I think, rte_pktmbuf_pool_create_by_op() may be a better name than rte_pktmbuf_pool_create_specific() > + unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, > + int socket_id, const char *ops_name)