From 69238e3cbedbf6dfd9fd65c1ef8fe12d0d5aabf9 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Mon, 18 Jul 2016 11:25:54 +0530 Subject: [PATCH] app/test: fix ring size 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 Acked-by: Olivier Matz --- 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 684ad80f93..c0823ea5a1 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__); -- 2.20.1