From: Anand B Jyoti Date: Fri, 2 Jun 2017 06:29:51 +0000 (+0530) Subject: ring: fix return value for dequeue X-Git-Tag: spdx-start~2963 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=077d2488895732d42a0e284e3564664a41203412;p=dpdk.git 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 --- 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; } /**