Skip to contentSkip to conversation

crypto/scheduler: fix slave name parsing

PATCH Applied Fan Zhang 2 participants 3 messages Jul 7, 2017 – Jul 11, 2017 Crypto API

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 crypto/scheduler: fix slave name parsing

Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

This patch fixes the incorrect index checking in parse_slave function.

---
 drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/scheduler/scheduler_pmd.c +1 -1
index 0f57fbe..400fc4f 100644
@@ -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;
 	}
Signature · 1 line
2.9.4
Acked-by on v1 1/1
#1 lore raw
Quoted 32 lines

-----Original Message-----
From: Zhang, Roy Fan
Sent: Friday, July 7, 2017 6:18 AM
To: [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: [PATCH] crypto/scheduler: fix slave name parsing

Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

This patch fixes the incorrect index checking in parse_slave function.

---
 drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/scheduler/scheduler_pmd.c +1 -1
index 0f57fbe..400fc4f 100644
@@ -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;
Quoted 3 lines

}
--
2.9.4

This should be backported to the stable branch, so I will add CC: [email protected], before applying this patch.

Apart from that:

#2 lore raw
In reply to Fan Zhang
Quoted 23 lines

-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday, July 11, 2017 3:23 PM
To: Zhang, Roy Fan <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH] crypto/scheduler: fix slave name parsing

Quoted 12 lines

-----Original Message-----
From: Zhang, Roy Fan
Sent: Friday, July 7, 2017 6:18 AM
To: [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>
Subject: [PATCH] crypto/scheduler: fix slave name parsing

Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

This patch fixes the incorrect index checking in parse_slave function.

...

Quoted 6 lines

This should be backported to the stable branch, so I will add CC:
[email protected], before applying this patch.

Apart from that:

Applied to dpdk-next-crypto.
Thanks,

Pablo