Skip to contentSkip to conversation

driver: crypto: scheduler: fix session size computation

PATCH In review jhascoet 2 participants 2 messages Jul 5, 2024 – Sep 30, 2024 Crypto API

lore
Share & tools
lore

jhascoet

author
#0 lore raw

PATCH 1/1 driver: crypto: scheduler: fix session size computation

From: jhascoet <[email protected]>

The crypto scheduler session size computation was taking into account only the worker session sizes and not its own.

Fixes e2af4e403c1 ("crypto/scheduler: support DOCSIS security protocol")
---
 drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/scheduler/scheduler_pmd_ops.c +1 -1
index a18f7a08b0..6e43438469 100644
@@ -185,7 +185,7 @@ scheduler_session_size_get(struct scheduler_ctx *sched_ctx,
 		uint8_t session_type)
 {
 	uint8_t i = 0;
-	uint32_t max_priv_sess_size = 0;
+	uint32_t max_priv_sess_size = sizeof(struct scheduler_session_ctx);
 
 	/* Check what is the maximum private session size for all workers */
 	for (i = 0; i < sched_ctx->nb_workers; i++) {
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw

________________________________
From: jhascoet <[email protected]>
Sent: 05 July 2024 09:35
To: [email protected] <[email protected]>
Cc: jhascoet <[email protected]>; [email protected] <[email protected]>; Ji, Kai <[email protected]>; O'Sullivan, Kevin <[email protected]>; Coyle, David <[email protected]>; Ciara Power <[email protected]>; Anoob Joseph <[email protected]>
Subject: [PATCH] driver: crypto: scheduler: fix session size computation

From: jhascoet <[email protected]>

The crypto scheduler session size computation was taking into account only the worker session sizes and not its own.

Fixes e2af4e403c1 ("crypto/scheduler: support DOCSIS security protocol")
---
 drivers/crypto/scheduler/scheduler_pmd_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/scheduler/scheduler_pmd_ops.c +1 -1
index a18f7a08b0..6e43438469 100644
@@ -185,7 +185,7 @@ scheduler_session_size_get(struct scheduler_ctx *sched_ctx,
                 uint8_t session_type)
 {
         uint8_t i = 0;
-       uint32_t max_priv_sess_size = 0;
+       uint32_t max_priv_sess_size = sizeof(struct scheduler_session_ctx);
 
         /* Check what is the maximum private session size for all workers */
         for (i = 0; i < sched_ctx->nb_workers; i++) {

--
2.34.1