From 077d2488895732d42a0e284e3564664a41203412 Mon Sep 17 00:00:00 2001 From: Anand B Jyoti Date: Fri, 2 Jun 2017 11:59:51 +0530 Subject: [PATCH] ring: fix return value for dequeue The error return code for rte_ring_sc_dequeue_bulk() and rte_ring_mc_dequeue_bulk() function should be -ENOENT rather than -ENOBUFS as described in the function description. Fixes: cfa7c9e6fc1f ("ring: make bulk and burst return values consistent") Cc: stable@dpdk.org Signed-off-by: Anand B Jyoti Acked-by: Olivier Matz --- lib/librte_ring/rte_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index e4e910b4f6..18684a53d1 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -801,7 +801,7 @@ rte_ring_dequeue_bulk(struct rte_ring *r, void **obj_table, unsigned int n, static __rte_always_inline int rte_ring_mc_dequeue(struct rte_ring *r, void **obj_p) { - return rte_ring_mc_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOBUFS; + return rte_ring_mc_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOENT; } /** @@ -819,7 +819,7 @@ rte_ring_mc_dequeue(struct rte_ring *r, void **obj_p) static __rte_always_inline int rte_ring_sc_dequeue(struct rte_ring *r, void **obj_p) { - return rte_ring_sc_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOBUFS; + return rte_ring_sc_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOENT; } /** -- 2.20.1