From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from [10.16.0.195] (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 2041329B91; Thu, 14 Apr 2016 15:43:09 +0200 (CEST) Message-ID: <570F9E8D.5020800@6wind.com> Date: Thu, 14 Apr 2016 15:43:41 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: "Wiles, Keith" , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" , "pmatilai@redhat.com" References: <1455302184-48822-1-git-send-email-keith.wiles@intel.com> <1460626956-12038-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5] mempool: reduce rte_mempool structure size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 13:43:52 -0000 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