From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v4 04/11] mempool: add op to calculate memory size to be allocated Date: Mon, 16 Apr 2018 17:33:41 +0200 Message-ID: <20180416153341.pko6s2xxzb6nv6m6@platinum> References: <1511539591-20966-1-git-send-email-arybchenko@solarflare.com> <1523885080-17168-1-git-send-email-arybchenko@solarflare.com> <1523885080-17168-5-git-send-email-arybchenko@solarflare.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Anatoly Burakov To: Andrew Rybchenko Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 04434AAA9 for ; Mon, 16 Apr 2018 17:33:45 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1523885080-17168-5-git-send-email-arybchenko@solarflare.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 Mon, Apr 16, 2018 at 02:24:33PM +0100, Andrew Rybchenko wrote: > Size of memory chunk required to populate mempool objects depends > on how objects are stored in the memory. Different mempool drivers > may have different requirements and a new operation allows to > calculate memory size in accordance with driver requirements and > advertise requirements on minimum memory chunk size and alignment > in a generic way. > > Bump ABI version since the patch breaks it. > > Suggested-by: Olivier Matz > Signed-off-by: Andrew Rybchenko [...] > @@ -643,39 +633,35 @@ rte_mempool_populate_default(struct rte_mempool *mp) > * 1G page on a 10MB memzone). If we fail to get enough contiguous > * memory, then we'll go and reserve space page-by-page. > */ > - no_pageshift = no_contig || force_contig || > - rte_eal_iova_mode() == RTE_IOVA_VA; > + no_pageshift = no_contig || rte_eal_iova_mode() == RTE_IOVA_VA; > try_contig = !no_contig && !no_pageshift && rte_eal_has_hugepages(); In case there is a v5 for another reason, I think the last line is equivalent to: try_contig = !no_pageshift && rte_eal_has_hugepages(); Otherwise: Acked-by: Olivier Matz