diff mbox series

crypto/octeontx: fix session-less mode

Message ID 20210301055955.8183-1-adwivedi@marvell.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers show
Series crypto/octeontx: fix session-less mode | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/github-robot success github build: passed
ci/travis-robot fail travis build: failed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ankur Dwivedi March 1, 2021, 5:59 a.m. UTC
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")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Akhil Goyal March 23, 2021, 7:01 p.m. UTC | #1
> 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.
> 
> Fixes: caeba5062c39 ("crypto/octeontx: improve symmetric session-less
> path")
> 
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> ---
Cc: stable@dpdk.org

Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 0cf760b296..b74eb2694b 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -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,