* [dpdk-dev] [PATCH] cryptodev: fix set_sym_session_private_data error in sessionless mode
@ 2019-12-10 17:35 Junxiao Shi
2020-01-27 11:53 ` Akhil Goyal
0 siblings, 1 reply; 5+ messages in thread
From: Junxiao Shi @ 2019-12-10 17:35 UTC (permalink / raw)
To: dev
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix set_sym_session_private_data error in sessionless mode
2019-12-10 17:35 [dpdk-dev] [PATCH] cryptodev: fix set_sym_session_private_data error in sessionless mode Junxiao Shi
@ 2020-01-27 11:53 ` Akhil Goyal
2020-01-27 18:32 ` [dpdk-dev] [PATCH] drivers/crypto: " Junxiao Shi
0 siblings, 1 reply; 5+ messages in thread
From: Akhil Goyal @ 2020-01-27 11:53 UTC (permalink / raw)
To: Junxiao Shi, dev
>
> 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 ......."
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] drivers/crypto: fix set_sym_session_private_data error in sessionless mode
2020-01-27 11:53 ` Akhil Goyal
@ 2020-01-27 18:32 ` Junxiao Shi
2020-02-05 12:36 ` Akhil Goyal
2020-02-13 9:31 ` Akhil Goyal
0 siblings, 2 replies; 5+ messages in thread
From: Junxiao Shi @ 2020-01-27 18:32 UTC (permalink / raw)
To: dev; +Cc: Akhil Goyal
When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:
CRYPTODEV: set_sym_session_private_data() line 489:
Set private data for driver 0 not allowed
Then, AESNI-MB driver segfaults in post_process_mb_job().
Bugzilla ID: 377
Fixes: b3bbd9e ("cryptodev: support device independent sessions")
Fixes: c68d7aa ("crypto/aesni_mb: use architecture independent macros")
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] drivers/crypto: fix set_sym_session_private_data error in sessionless mode
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
1 sibling, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2020-02-05 12:36 UTC (permalink / raw)
To: Junxiao Shi, dev, pablo.de.lara.guarch
Hi Pablo,
> When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
> for symmetric crypto operation (e.g. SHA256 hash), the driver prints
> error message:
>
> CRYPTODEV: set_sym_session_private_data() line 489:
> Set private data for driver 0 not allowed
>
> Then, AESNI-MB driver segfaults in post_process_mb_job().
>
> Bugzilla ID: 377
> Fixes: b3bbd9e ("cryptodev: support device independent sessions")
> Fixes: c68d7aa ("crypto/aesni_mb: use architecture independent macros")
>
> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> ---
Could you please Ack this patch of no issues?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] drivers/crypto: fix set_sym_session_private_data error in sessionless mode
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
1 sibling, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2020-02-13 9:31 UTC (permalink / raw)
To: Junxiao Shi, dev
>
> When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
> for symmetric crypto operation (e.g. SHA256 hash), the driver prints
> error message:
>
> CRYPTODEV: set_sym_session_private_data() line 489:
> Set private data for driver 0 not allowed
>
> Then, AESNI-MB driver segfaults in post_process_mb_job().
>
> Bugzilla ID: 377
> Fixes: b3bbd9e ("cryptodev: support device independent sessions")
> Fixes: c68d7aa ("crypto/aesni_mb: use architecture independent macros")
>
> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> ---
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-13 9:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 17:35 [dpdk-dev] [PATCH] cryptodev: fix set_sym_session_private_data error in sessionless mode Junxiao Shi
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
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).