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: a9fe152363
("test/ring: add custom element size functional tests")
Cc: stable@dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This commit is contained in:
parent
a4ab862e99
commit
6450023ca2
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user