patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] crypto/octeontx: fix session-less mode
@ 2021-03-01  5:59 Ankur Dwivedi
  2021-03-23 19:01 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Ankur Dwivedi @ 2021-03-01  5:59 UTC (permalink / raw)
  To: dev; +Cc: stable, gakhil, anoobj, Ankur Dwivedi

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(-)

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,
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] crypto/octeontx: fix session-less mode
  2021-03-01  5:59 [dpdk-stable] [PATCH] crypto/octeontx: fix session-less mode Ankur Dwivedi
@ 2021-03-23 19:01 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2021-03-23 19:01 UTC (permalink / raw)
  To: Ankur Dwivedi, dev; +Cc: stable, Anoob Joseph, Ankur Dwivedi

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-23 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01  5:59 [dpdk-stable] [PATCH] crypto/octeontx: fix session-less mode Ankur Dwivedi
2021-03-23 19:01 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).