Skip to content

Commit

Permalink
crypto/octeontx: fix session-less mode
Browse files Browse the repository at this point in the history
[ upstream commit 8e177f1 ]

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: caeba50 ("crypto/octeontx: improve symmetric session-less path")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  • Loading branch information
adwivedi7 authored and steevenlee committed May 8, 2021
1 parent 9e520a5 commit 96d2d64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/octeontx/otx_cryptodev_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 96d2d64

Please sign in to comment.