From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com
Subject: [dpdk-dev] [PATCH v2] crypto/scheduler: fix initialization
Date: Thu, 9 Feb 2017 18:36:41 +0000 [thread overview]
Message-ID: <1486665401-14923-1-git-send-email-roy.fan.zhang@intel.com> (raw)
Fixes the wrong slave initialization issue on start-up
Fixes: 100e4f7("add round-robin mode")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
v2:
remove committed lines of code not relating to the topic
drivers/crypto/scheduler/scheduler_roundrobin.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/scheduler/scheduler_roundrobin.c b/drivers/crypto/scheduler/scheduler_roundrobin.c
index 7abdd29..1f5448e 100644
--- a/drivers/crypto/scheduler/scheduler_roundrobin.c
+++ b/drivers/crypto/scheduler/scheduler_roundrobin.c
@@ -350,7 +350,6 @@ static int
scheduler_start(struct rte_cryptodev *dev)
{
struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-
uint16_t i;
for (i = 0; i < dev->data->nb_queue_pairs; i++) {
@@ -358,14 +357,13 @@ scheduler_start(struct rte_cryptodev *dev)
struct rr_scheduler_qp_ctx *rr_qp_ctx =
qp_ctx->private_qp_ctx;
uint32_t j;
- uint16_t qp_id = rr_qp_ctx->slaves[0].qp_id;
memset(rr_qp_ctx->slaves, 0, MAX_SLAVES_NUM *
sizeof(struct scheduler_slave));
for (j = 0; j < sched_ctx->nb_slaves; j++) {
rr_qp_ctx->slaves[j].dev_id =
- sched_ctx->slaves[i].dev_id;
- rr_qp_ctx->slaves[j].qp_id = qp_id;
+ sched_ctx->slaves[j].dev_id;
+ rr_qp_ctx->slaves[j].qp_id = i;
}
rr_qp_ctx->nb_slaves = sched_ctx->nb_slaves;
--
2.7.4
reply other threads:[~2017-02-09 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1486665401-14923-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).