crypto/scheduler: fix slave name parsing
This patch fixes the incorrect index checking in parse_slave
function.
Fixes: 503e9c5afb
("crypto/scheduler: register as vdev driver")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
parent
30883f3e1d
commit
829d132731
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user