From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 81FD2271 for ; Sun, 9 Jul 2017 11:44:37 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id 77so17886995wrb.3 for ; Sun, 09 Jul 2017 02:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id; bh=vEE+xxVN94dTL3gg3X7K6GFGD/E27GCF0XC7NiGIODo=; b=bcCEloBdKrW7hFDnp6YzQtoibMDDEdY5XToz+37JHyw+ZfuAod6dfHsrf93eaNvaVj 1x/L1Vm1GE1XlKUvkZul1xIEML6rzXxrITXQT5BocgnrO/Rwlu4usJlHCJTZaBUikJp1 KmzMXjubqKIO8OEYeqbsnTTzdC+SKRDq1VzcBX08MeNAIlwMY4Vs6HuhbwxPXskpEhzf 8sxafNSCdKqHCLr3JXHIOAO5tbozFxp4hcSbe2CsENxyBJYlIcF5xc2oUcKnLzlEmV1G 0Yi7j60AMZ36TOuZpM3VBTHodMlsDSxSzctTYH5XF8J/9/WNEErex6CqmGaH9gmWOLM7 jHeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=vEE+xxVN94dTL3gg3X7K6GFGD/E27GCF0XC7NiGIODo=; b=cahPtarPLlYdt/3uUZ0nvVBtRHpewi070NG60RHlZiIksDyFaybKpcL3QhvN4Cyauq QWeODPKnbKFcJWGMaImXCPUju0sT+Hcp7avVi+BVxIR+uAUDB2irdjF1185oFXpm8CvX TmC5s1Cl5c5vPfJfWwNaEXCSjah7MvZe8M8FW9bOA/EcShg5ZfU76AP70tWZ18qzJ6JA dZoJ8syLmZIGNHFmgOmFVnpWuvfGYHxw5r7wPkBc6KVTV/3e/y+NcfPaKjobUrw2SQm2 maeGiq5ie3MRG+e761Qqhe2xsYVMv78yR2UGCdrnoW4d7VI3a3fV0mO4j5jtf3yNLUZX T6GA== X-Gm-Message-State: AIVw110rMpPZd8XSY8njcMu+ae/OnnGkWoHNyQFrXDqkRlVp1VJXcby9 5uCb+JofhbkXhi7i X-Received: by 10.80.181.80 with SMTP id z16mr7917786edd.6.1499593476834; Sun, 09 Jul 2017 02:44:36 -0700 (PDT) Received: from localhost.localdomain ([37.228.147.16]) by smtp.gmail.com with ESMTPSA id l3sm4627924edc.32.2017.07.09.02.44.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 09 Jul 2017 02:44:36 -0700 (PDT) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Sun, 9 Jul 2017 05:44:16 -0400 Message-Id: <20170709094416.15045-1-jblunck@infradead.org> X-Mailer: git-send-email 2.13.2 Subject: [dpdk-dev] [PATCH] crypto/scheduler: fix build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jul 2017 09:44:37 -0000 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 --- 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