From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 2172C3989 for ; Thu, 21 Jul 2016 15:41:16 +0200 (CEST) Received: from alille-653-1-293-182.w90-1.abo.wanadoo.fr ([90.1.53.182] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bQEGS-0007d8-DB; Thu, 21 Jul 2016 15:43:52 +0200 To: Jerin Jacob , dev@dpdk.org References: <1468821354-23612-1-git-send-email-jerin.jacob@caviumnetworks.com> Cc: thomas.monjalon@6wind.com From: Olivier Matz Message-ID: <1b08ca23-42ab-a7f5-0f45-6512388da275@6wind.com> Date: Thu, 21 Jul 2016 15:41:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <1468821354-23612-1-git-send-email-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/test: fix refcnt_mbuf_ring 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, 21 Jul 2016 13:41:16 -0000 Hi Jerin, On 07/18/2016 07:55 AM, Jerin Jacob wrote: > rte_ring_create expects the size of the ring to > be a power of 2. REFCNT_RING_SIZE value is not > power of 2 in-case if RTE_MAX_LCORE == 96. > Fix it by aligning the size to next power of 2 value. > > Fixes: af75078f ("first public release") > > Signed-off-by: Jerin Jacob > --- > app/test/test_mbuf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c > index 684ad80..c0823ea 100644 > --- a/app/test/test_mbuf.c > +++ b/app/test/test_mbuf.c > @@ -809,7 +809,7 @@ test_refcnt_mbuf(void) > > if (refcnt_mbuf_ring == NULL && > (refcnt_mbuf_ring = rte_ring_create("refcnt_mbuf_ring", > - REFCNT_RING_SIZE, SOCKET_ID_ANY, > + rte_align32pow2(REFCNT_RING_SIZE), SOCKET_ID_ANY, > RING_F_SP_ENQ)) == NULL) { > printf("%s: cannot allocate " MAKE_STRING(refcnt_mbuf_ring) > "\n", __func__); > Acked-by: Olivier Matz