[dpdk-dev,v1] ring: fix return value for sc and mc dequeue
Checks
Commit Message
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.
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
---
lib/librte_ring/rte_ring.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi Anand,
On Fri, 2 Jun 2017 11:59:51 +0530, Anand B Jyoti <anand.b.jyoti@intel.com> wrote:
> 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")
> Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
23/06/2017 10:43, Olivier Matz:
> Hi Anand,
>
> On Fri, 2 Jun 2017 11:59:51 +0530, Anand B Jyoti <anand.b.jyoti@intel.com> wrote:
> > 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>
Applied, thanks
@@ -801,7 +801,7 @@ rte_ring_dequeue_bulk(struct rte_ring *r, void **obj_table, unsigned int n,
static inline int __attribute__((always_inline))
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 inline int __attribute__((always_inline))
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;
}
/**