From: Junxiao Shi <git@mail1.yoursunny.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] cryptodev: fix set_sym_session_private_data error in sessionless mode
Date: Tue, 10 Dec 2019 10:35:01 -0700 [thread overview]
Message-ID: <201912101740.xBAHe5l2002645@lectura.cs.arizona.edu> (raw)
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(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 97d9f81..33f4167 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -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,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 91f0283..199097b 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -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,
--
2.7.4
next reply other threads:[~2019-12-10 17:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 17:35 Junxiao Shi [this message]
2020-01-27 11:53 ` Akhil Goyal
2020-01-27 18:32 ` [dpdk-dev] [PATCH] drivers/crypto: " Junxiao Shi
2020-02-05 12:36 ` Akhil Goyal
2020-02-13 9:31 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201912101740.xBAHe5l2002645@lectura.cs.arizona.edu \
--to=git@mail1.yoursunny.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).