cryptodev: fix set_sym_session_private_data error in sessionless mode
Checks
Commit Message
Bugzilla ID: 377
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++--
drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Comments
>
> Bugzilla ID: 377
>
> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> ---
Please add appropriate description about the bug and also add
Fixes line to show the original commit.
Change the patch title also as
"drivers/crypto: fix ......."
@@ -729,10 +729,10 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
op->sym->session,
cryptodev_driver_id);
} else {
- void *_sess = NULL;
+ void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
void *_sess_private_data = NULL;
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+ if (_sess == NULL)
return NULL;
if (rte_mempool_get(qp->sess_mp_priv,
@@ -762,10 +762,10 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
return NULL;
/* provide internal session */
- void *_sess = NULL;
+ void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
void *_sess_private_data = NULL;
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+ if (_sess == NULL)
return NULL;
if (rte_mempool_get(qp->sess_mp_priv,