From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com
Subject: [dpdk-dev] [PATCH] crypto/scheduler: change ordering ring dequeue
Date: Wed, 19 Apr 2017 15:47:02 +0100 [thread overview]
Message-ID: <1492613222-60184-1-git-send-email-roy.fan.zhang@intel.com> (raw)
Commit <ecaed092b677> ("ring: return remaining entry count when
dequeuing") changed the return of rte_ring_sc_dequeue_bulk, this
patch updates the scheduler to comply with this change.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index 33edd1d..421dae3 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -132,7 +132,7 @@ scheduler_order_drain(struct rte_ring *order_ring,
struct rte_crypto_op *op;
uint32_t nb_objs = rte_ring_count(order_ring);
uint32_t nb_ops_to_deq = 0;
- int status = -1;
+ uint32_t nb_ops_deqd = 0;
if (nb_objs > nb_ops)
nb_objs = nb_ops;
@@ -145,10 +145,10 @@ scheduler_order_drain(struct rte_ring *order_ring,
}
if (nb_ops_to_deq)
- status = rte_ring_sc_dequeue_bulk(order_ring, (void **)ops,
- nb_ops_to_deq, NULL);
+ nb_ops_deqd = rte_ring_sc_dequeue_bulk(order_ring,
+ (void **)ops, nb_ops_to_deq, NULL);
- return (status == 0) ? nb_ops_to_deq : 0;
+ return nb_ops_deqd;
}
/** device specific operations function pointer structure */
extern struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops;
--
2.7.4
next reply other threads:[~2017-04-19 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 14:47 Fan Zhang [this message]
2017-04-19 16:31 ` De Lara Guarch, Pablo
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=1492613222-60184-1-git-send-email-roy.fan.zhang@intel.com \
--to=roy.fan.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@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).