DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/scheduler: fix build
@ 2017-07-09  9:44 Jan Blunck
  2017-07-09 10:38 ` Thomas Monjalon
  2017-07-09 15:05 ` Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Blunck @ 2017-07-09  9:44 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-09 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-09  9:44 [dpdk-dev] [PATCH] crypto/scheduler: fix build Jan Blunck
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

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).