From: Anand B Jyoti <anand.b.jyoti@intel.com>
To: dev@dpdk.org
Cc: kannan.babu.ramia@intel.com
Subject: [dpdk-dev] [PATCH v1] ring: fix return value for sc and mc dequeue
Date: Fri, 2 Jun 2017 11:59:51 +0530 [thread overview]
Message-ID: <1496384991-156503-1-git-send-email-anand.b.jyoti@intel.com> (raw)
In-Reply-To: <A1F25702B3CE3F4F8D3936A55AD1FF37925DB5F9@BGSMSX108.gar.corp.intel.com>
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(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 97f025a..3400ed8 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 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;
}
/**
--
2.7.4
next prev parent reply other threads:[~2017-06-02 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 17:21 [dpdk-dev] [PATCH] examples/ip_pipeline: check vlan and mpls params Jyoti, Anand B
2017-01-08 21:55 ` [dpdk-dev] [PATCH v2] examples/ip_pipeline: check VLAN and MPLS params Jyoti, Anand B
2017-01-17 17:27 ` Thomas Monjalon
2017-01-08 23:20 ` [dpdk-dev] [PATCH] examples/ip_pipeline: check vlan and mpls params Stephen Hemminger
2017-06-02 6:29 ` Anand B Jyoti [this message]
2017-06-23 8:43 ` [dpdk-dev] [PATCH v1] ring: fix return value for sc and mc dequeue Olivier Matz
2017-06-23 12:43 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496384991-156503-1-git-send-email-anand.b.jyoti@intel.com \
--to=anand.b.jyoti@intel.com \
--cc=dev@dpdk.org \
--cc=kannan.babu.ramia@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).