From 829d1327310be6d79ad8d6617f7abcc1ad1ad202 Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Fri, 7 Jul 2017 06:17:30 +0100 Subject: [PATCH] crypto/scheduler: fix slave name parsing This patch fixes the incorrect index checking in parse_slave function. Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver") Cc: stable@dpdk.org Signed-off-by: Fan Zhang Acked-by: Pablo de Lara --- drivers/crypto/scheduler/scheduler_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c index 0f57fbefdd..400fc4f149 100644 --- a/drivers/crypto/scheduler/scheduler_pmd.c +++ b/drivers/crypto/scheduler/scheduler_pmd.c @@ -325,7 +325,7 @@ parse_slave_arg(const char *key __rte_unused, { struct scheduler_init_params *param = extra_args; - if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES - 1) { + if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES) { CS_LOG_ERR("Too many slaves.\n"); return -ENOMEM; } -- 2.20.1