Directly call "_rte_ring_do_enqueue_elem" function can result in the process skips the "switch" order and cannot call the APIs of RTS and HTS mode in "rte_ring_enqueue_bulk_elem" function.
To fix it, remove the unnecessary function and make "_rte_ring_do_enqueue_elem" consistent with "_rte_ring_do_dequeue_elem". Fixes: e6ba4731c0f3 ("ring: introduce RTS ring mode") Cc: sta...@dpdk.org Signed-off-by: Feifei Wang <feifei.wa...@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.w...@arm.com> --- lib/librte_ring/rte_ring_elem.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h index a5a4c46f9..469aee7da 100644 --- a/lib/librte_ring/rte_ring_elem.h +++ b/lib/librte_ring/rte_ring_elem.h @@ -578,9 +578,6 @@ static __rte_always_inline unsigned int rte_ring_enqueue_bulk_elem(struct rte_ring *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) { - return __rte_ring_do_enqueue_elem(r, obj_table, esize, n, - RTE_RING_QUEUE_FIXED, r->prod.sync_type, free_space); - switch (r->prod.sync_type) { case RTE_RING_SYNC_MT: return rte_ring_mp_enqueue_bulk_elem(r, obj_table, esize, n, -- 2.17.1