DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@infradead.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] crypto/scheduler: fix build
Date: Sun,  9 Jul 2017 05:44:16 -0400	[thread overview]
Message-ID: <20170709094416.15045-1-jblunck@infradead.org> (raw)

Fixes 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")

drivers/crypto/scheduler/scheduler_multicore.c: In function 'scheduler_stop':
drivers/crypto/scheduler/scheduler_multicore.c:286:2: error: 'for' loop
 initial declarations are only allowed in C99 or C11 mode
  for (uint16_t i = 0; i < sched_ctx->nb_wc; i++)
  ^
compilation terminated due to -Wfatal-errors.
mk/internal/rte.compile-pre.mk:138: recipe for target 'scheduler_multicore.o'
 failed
make[4]: *** [scheduler_multicore.o] Error 1
make[4]: *** Waiting for unfinished jobs....

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 drivers/crypto/scheduler/scheduler_multicore.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/scheduler/scheduler_multicore.c b/drivers/crypto/scheduler/scheduler_multicore.c
index a568be4f1..bed9a8fd8 100644
--- a/drivers/crypto/scheduler/scheduler_multicore.c
+++ b/drivers/crypto/scheduler/scheduler_multicore.c
@@ -280,10 +280,11 @@ scheduler_stop(struct rte_cryptodev *dev)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	struct mc_scheduler_ctx *mc_ctx = sched_ctx->private_ctx;
+	uint16_t i;
 
 	mc_ctx->stop_signal = 1;
 
-	for (uint16_t i = 0; i < sched_ctx->nb_wc; i++)
+	for (i = 0; i < sched_ctx->nb_wc; i++)
 		rte_eal_wait_lcore(sched_ctx->wc_pool[i]);
 
 	return 0;
@@ -316,6 +317,7 @@ scheduler_create_private_ctx(struct rte_cryptodev *dev)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	struct mc_scheduler_ctx *mc_ctx;
+	uint16_t i;
 
 	if (sched_ctx->private_ctx)
 		rte_free(sched_ctx->private_ctx);
@@ -328,7 +330,7 @@ scheduler_create_private_ctx(struct rte_cryptodev *dev)
 	}
 
 	mc_ctx->num_workers = sched_ctx->nb_wc;
-	for (uint16_t i = 0; i < sched_ctx->nb_wc; i++) {
+	for (i = 0; i < sched_ctx->nb_wc; i++) {
 		char r_name[16];
 
 		snprintf(r_name, sizeof(r_name), MC_SCHED_ENQ_RING_NAME_PREFIX "%u", i);
-- 
2.13.2

             reply	other threads:[~2017-07-09  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09  9:44 Jan Blunck [this message]
2017-07-09 10:38 ` Thomas Monjalon
2017-07-09 10:43   ` Jan Blunck
2017-07-09 13:26     ` Thomas Monjalon
2017-07-09 15:05 ` 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=20170709094416.15045-1-jblunck@infradead.org \
    --to=jblunck@infradead.org \
    --cc=dev@dpdk.org \
    /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).