From: Feifei Wang Date: Sun, 20 Sep 2020 11:48:50 +0000 (-0500) Subject: test/ring: fix object reference for single element enqueue X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6450023ca20c46240dca06eca43af997f35de206;p=dpdk.git test/ring: fix object reference for single element enqueue When enqueue one element to ring in the performance test, a pointer should be passed to rte_ring_[sp|mp]enqueue APIs, not the pointer to a table of void *pointers. Fixes: a9fe152363e2 ("test/ring: add custom element size functional tests") Cc: stable@dpdk.org Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang Reviewed-by: Phil Yang Reviewed-by: Honnappa Nagarahalli Acked-by: Konstantin Ananyev --- diff --git a/app/test/test_ring.h b/app/test/test_ring.h index aa6ae67ca9..d4b15af7c2 100644 --- a/app/test/test_ring.h +++ b/app/test/test_ring.h @@ -50,11 +50,11 @@ test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned int n, if ((esize) == -1) switch (api_type) { case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE): - return rte_ring_enqueue(r, obj); + return rte_ring_enqueue(r, *obj); case (TEST_RING_THREAD_SPSC | TEST_RING_ELEM_SINGLE): - return rte_ring_sp_enqueue(r, obj); + return rte_ring_sp_enqueue(r, *obj); case (TEST_RING_THREAD_MPMC | TEST_RING_ELEM_SINGLE): - return rte_ring_mp_enqueue(r, obj); + return rte_ring_mp_enqueue(r, *obj); case (TEST_RING_THREAD_DEF | TEST_RING_ELEM_BULK): return rte_ring_enqueue_bulk(r, obj, n, NULL); case (TEST_RING_THREAD_SPSC | TEST_RING_ELEM_BULK):