From: Ankur Dwivedi Date: Mon, 1 Mar 2021 05:59:55 +0000 (+0530) Subject: crypto/octeontx: fix session-less mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8e177f149ec3c8ace46d225bb0bc69b7e099c7a4;p=dpdk.git 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") Cc: stable@dpdk.org Signed-off-by: Ankur Dwivedi Acked-by: Akhil Goyal --- 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,