From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v5] mempool: reduce rte_mempool structure size Date: Thu, 14 Apr 2016 15:43:41 +0200 Message-ID: <570F9E8D.5020800@6wind.com> References: <1455302184-48822-1-git-send-email-keith.wiles@intel.com> <1460626956-12038-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "thomas.monjalon@6wind.com" , "pmatilai@redhat.com" To: "Wiles, Keith" , "dev@dpdk.org" Return-path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id D63622BD4 for ; Thu, 14 Apr 2016 15:43:51 +0200 (CEST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, On 04/14/2016 03:28 PM, Wiles, Keith wrote: >> From: Keith Wiles >> --- a/app/test/test_mempool.c >> +++ b/app/test/test_mempool.c >> @@ -122,8 +122,8 @@ test_mempool_basic(void) >> return -1; >> >> printf("get private data\n"); >> - if (rte_mempool_get_priv(mp) != >> - (char*) mp + MEMPOOL_HEADER_SIZE(mp, mp->pg_num)) >> + if (rte_mempool_get_priv(mp) != (char *)mp + >> + MEMPOOL_HEADER_SIZE(mp, mp->pg_num, mp->cache_size)) > > Should we not add the RTE_PTR_ADD() here as well? The displayed error message was "cast increases required alignment of target type", and in this case the alignment constraint of mp is higher than the constraint for char * (1). So I think there is no issue here... at least I can say it compiles without error. Regards, Olivier