Skip to contentSkip to conversation

crypto/octeontx: fix session-less mode

PATCH Applied Ankur Dwivedi 2 participants 2 messages Mar 1, 2021 – Mar 23, 2021 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/octeontx: fix session-less mode

A temporary session is created for sessionless crypto operations. rte_cryptodev_sym_session_create() should be used for creating the temporary session as it initializes the session structure in the correct way.

Fixes caeba5062c39 ("crypto/octeontx: improve symmetric session-less path")
---
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/octeontx/otx_cryptodev_ops.c +2 -2
index 0cf760b296..b74eb2694b 100644
@@ -577,8 +577,8 @@ otx_cpt_enq_single_sym_sessless(struct cpt_instance *instance,
 	int ret;
 
 	/* Create temporary session */
-
-	if (rte_mempool_get(instance->sess_mp, (void **)&sess))
+	sess = rte_cryptodev_sym_session_create(instance->sess_mp);
+	if (sess == NULL)
 		return -ENOMEM;
 
 	ret = sym_session_configure(driver_id, sym_op->xform, sess,
Signature · 1 line
2.28.0
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 7 lines

Subject: [PATCH] crypto/octeontx: fix session-less mode

A temporary session is created for sessionless crypto operations. rte_cryptodev_sym_session_create() should be used for creating the temporary session as it initializes the session structure in the correct way.

Quoted 5 lines
Fixes caeba5062c39 ("crypto/octeontx: improve symmetric session-less

path")

---

Applied to dpdk-next-crypto

Thanks.