From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH 1/2] mempool: indicate the usages of multi memzones Date: Wed, 20 Dec 2017 17:29:59 +0530 Message-ID: <42572f99-99bd-ee70-e631-b817d1d679ac@nxp.com> References: <1512563473-19969-1-git-send-email-hemant.agrawal@nxp.com> <20171219102456.ghipiyb2ig43d4nk@glumotte.dev.6wind.com> <830d3e36-921b-ef7a-51a4-6d135b15e973@nxp.com> <20171219110204.uqxw4xy66o65pnjz@glumotte.dev.6wind.com> <9adf0fc2-b233-26c6-b866-236d6277a4ed@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Olivier MATZ Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0042.outbound.protection.outlook.com [104.47.37.42]) by dpdk.org (Postfix) with ESMTP id 69F5D1B1BD for ; Wed, 20 Dec 2017 13:00:04 +0100 (CET) In-Reply-To: <9adf0fc2-b233-26c6-b866-236d6277a4ed@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" On 12/19/2017 6:38 PM, Hemant Agrawal wrote: > >> That's true, I commented too fast :) >> And what about using mp->nb_mem_chunks instead? Would it do the job >> in your use-case? > > It should work. Let me check it out. There is a slight problem with nb_mem_chunks. It is getting incremented in the end of "rte_mempool_populate_phys", while the elements are getting populated before it in the call of mempool_add_elem. I can use nb_mem_chunks are '0' check. However it can break in future if mempool_populate_phys changes. > > Thanks > Regards, > Hemant >