From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com
Subject: [dpdk-dev] [PATCH 02/10] crypto/dpaa_sec: session reset before init
Date: Thu, 30 Aug 2018 11:20:57 +0530 [thread overview]
Message-ID: <1535608265-13323-3-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1535608265-13323-1-git-send-email-hemant.agrawal@nxp.com>
From: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 ++
drivers/crypto/dpaa_sec/dpaa_sec.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index ac49029..27f2eca 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2099,6 +2099,7 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev,
return -1;
}
+ memset(session, 0, sizeof(dpaa2_sec_session));
/* Default IV length = 0 */
session->iv.length = 0;
@@ -2156,6 +2157,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
PMD_INIT_FUNC_TRACE();
+ memset(session, 0, sizeof(dpaa2_sec_session));
if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
cipher_xform = &conf->crypto_xform->cipher;
auth_xform = &conf->crypto_xform->next->auth;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 8f183e9..95f317d 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1762,6 +1762,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
DPAA_SEC_ERR("invalid session struct");
return -EINVAL;
}
+ memset(session, 0, sizeof(dpaa_sec_session));
/* Default IV length = 0 */
session->iv.length = 0;
@@ -1896,6 +1897,7 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
PMD_INIT_FUNC_TRACE();
+ memset(session, 0, sizeof(dpaa_sec_session));
if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
cipher_xform = &conf->crypto_xform->cipher;
auth_xform = &conf->crypto_xform->next->auth;
--
2.7.4
next prev parent reply other threads:[~2018-08-30 5:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 5:50 [dpdk-dev] [PATCH 00/10] crypto: DPAA and DPAA2_SEC enhancements Hemant Agrawal
2018-08-30 5:50 ` [dpdk-dev] [PATCH 01/10] crypto/dpaa2_sec: update the flib RTA to latest Hemant Agrawal
2018-08-30 5:50 ` Hemant Agrawal [this message]
2018-08-30 5:50 ` [dpdk-dev] [PATCH 03/10] crypto/dpaa_sec: add LOCK before Rx HW queue attach Hemant Agrawal
2018-08-30 5:50 ` [dpdk-dev] [PATCH 04/10] crypto/dpaa_sec: session qp should match with given qp Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 05/10] crypto/dpaa_sec: reduce the number of QP per device Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 06/10] crypto/dpaa_sec: enable sequence no rollover Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 07/10] crypto/dpaa2_sec: " Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 08/10] crypto/dpaa2_sec: add out of place crypto support Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 09/10] crypto/dpaa2_sec: multi algo support for ipsec session Hemant Agrawal
2018-08-30 5:51 ` [dpdk-dev] [PATCH 10/10] crypto/dpaa_sec: ipsec offload add null algo support Hemant Agrawal
2018-09-26 12:27 ` [dpdk-dev] [PATCH 00/10] crypto: DPAA and DPAA2_SEC enhancements 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=1535608265-13323-3-git-send-email-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=akhil.goyal@nxp.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).