From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH 1/2] Revert "eal: fix default mempool ops" Date: Fri, 2 Feb 2018 02:10:00 +0530 Message-ID: <20180201203959.wi3e56buepnu3px6@Pavan-LT> References: <1517514427-28843-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Hemant Agrawal , "olivier.matz@6wind.com" , "thomas@monjalon.net" , jerin.jacob@caviumnetworks.com Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0054.outbound.protection.outlook.com [104.47.38.54]) by dpdk.org (Postfix) with ESMTP id A048C2951 for ; Thu, 1 Feb 2018 21:40:28 +0100 (CET) Content-Disposition: inline In-Reply-To: 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 Hemanth, Currently, best_mempool_ops is broken because when rte_mbuf_user_mempool_ops is invoked it is expected to returns 'NULL' through internal_config.user_mbuf_pool_ops_name. IMO it is best to create a named memzone ('mbuf_user_pool_ops') at the end of eal_init and copy mbuf-pool-ops passed to eal. `rte_eal_mbuf_default_mempool_ops` is not expected to return 'NULL' would doing so break the ABI?. --- /** * Get default pool ops name for mbuf * * @return * returns default pool ops name. */ const char * rte_eal_mbuf_default_mempool_ops(void); --- IMO creating named mempool at the end of eal_init and changing `rte_mbuf_user_mempool_ops` as below would be a better solution. rte_mbuf_user_mempool_ops(void) { ... mz = rte_memzone_lookup("mbuf_user_pool_ops"); if (mz == NULL) return NULL; ... } Thoughts? Pavan. On Thu, Feb 01, 2018 at 07:56:47PM +0000, Hemant Agrawal wrote: > Hi Pavan, > Your patch was breaking the design of the best_mempool_ops and the whole purpose of selection was getting lost. > I guess you were trying to fix test_mempool. I have sent another patch, which fixes that and start using the best mempool ops API > instead of default mempool ops API. > > Regards, > Hemant > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hemant Agrawal > > Sent: Friday, February 02, 2018 1:17 AM > > To: olivier.matz@6wind.com; pbhagavatula@caviumnetworks.com > > Cc: thomas@monjalon.net; dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 1/2] Revert "eal: fix default mempool ops" > > > > This reverts commit fe06cb6c54fe5ada299ebba40a382bee37c919f2. > > ---