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 <anand.b.jyoti@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
41218a9d43
commit
077d248889
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user