From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38C48A0353; Tue, 5 Nov 2019 13:48:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 677C737B0; Tue, 5 Nov 2019 13:48:36 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 64E7A37AF for ; Tue, 5 Nov 2019 13:48:35 +0100 (CET) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 27CBE33AF74; Tue, 5 Nov 2019 13:48:35 +0100 (CET) Date: Tue, 5 Nov 2019 13:48:35 +0100 From: Olivier Matz To: Andrew Rybchenko Cc: dev@dpdk.org, Anatoly Burakov , Ferruh Yigit , "Giridharan, Ganesan" , Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Stephen Hemminger , Thomas Monjalon , Vamsi Krishna Attunuru , Hemant Agrawal , Nipun Gupta Message-ID: <20191105124835.GA6671@glumotte.dev.6wind.com> References: <20190719133845.32432-1-olivier.matz@6wind.com> <20191104151254.6354-1-olivier.matz@6wind.com> <20191104151254.6354-8-olivier.matz@6wind.com> <9dd4e6c2-57ea-60c4-9a37-f57918bcbb2e@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9dd4e6c2-57ea-60c4-9a37-f57918bcbb2e@solarflare.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v3 7/7] mempool: use the specific macro for object alignment 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Nov 05, 2019 at 03:15:13PM +0300, Andrew Rybchenko wrote: > On 11/4/19 6:12 PM, Olivier Matz wrote: > > For consistency, RTE_MEMPOOL_ALIGN should be used in place of > > RTE_CACHE_LINE_SIZE. They have the same value, because the only arch > > that was defining a specific value for it has been removed from dpdk. > > > > Signed-off-by: Olivier Matz > > Reviewed-by: Andrew Rybchenko > > Acked-by: Nipun Gupta > > --- > > drivers/mempool/bucket/rte_mempool_bucket.c | 8 +++++++- > > lib/librte_mempool/rte_mempool.c | 2 +- > > lib/librte_mempool/rte_mempool.h | 3 +++ > > lib/librte_mempool/rte_mempool_ops_default.c | 2 +- > > 4 files changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/mempool/bucket/rte_mempool_bucket.c b/drivers/mempool/bucket/rte_mempool_bucket.c > > index b978fd220..5ce1ef16f 100644 > > --- a/drivers/mempool/bucket/rte_mempool_bucket.c > > +++ b/drivers/mempool/bucket/rte_mempool_bucket.c > > @@ -401,6 +401,11 @@ bucket_alloc(struct rte_mempool *mp) > > struct bucket_data *bd; > > unsigned int i; > > unsigned int bucket_header_size; > > + size_t pg_sz; > > + > > + rc = rte_mempool_get_page_size(mp, &pg_sz); > > + if (rc < 0) > > + return rc; > > Looks unrelated to the patch. Oops, indeed, every change in rte_mempool_bucket.c should be in patch 6/7 "mempool: prevent objects from being across pages", Thanks for spotting it. > > > bd = rte_zmalloc_socket("bucket_pool", sizeof(*bd), > > RTE_CACHE_LINE_SIZE, mp->socket_id); > > [snip] > >