DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH 02/10] crypto/dpaa2_sec: fix ipv6 support
Date: Fri, 11 Oct 2019 22:02:25 +0530	[thread overview]
Message-ID: <20191011163233.31017-3-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20191011163233.31017-1-hemant.agrawal@nxp.com>

HW PDB Option was being overwritten.

Fixes: 53982ba2805d ("crypto/dpaa2_sec: support IPv6 tunnel for protocol offload")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 2ab34a00f..14f0c523c 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2819,13 +2819,12 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
 			RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {
 		flc->dhr = SEC_FLC_DHR_INBOUND;
 		memset(&decap_pdb, 0, sizeof(struct ipsec_decap_pdb));
-		decap_pdb.options = sizeof(struct ip) << 16;
-		if (ipsec_xform->options.esn)
-			decap_pdb.options |= PDBOPTS_ESP_ESN;
 		decap_pdb.options = (ipsec_xform->tunnel.type ==
 				RTE_SECURITY_IPSEC_TUNNEL_IPV4) ?
 				sizeof(struct ip) << 16 :
 				sizeof(struct rte_ipv6_hdr) << 16;
+		if (ipsec_xform->options.esn)
+			decap_pdb.options |= PDBOPTS_ESP_ESN;
 		session->dir = DIR_DEC;
 		bufsize = cnstr_shdsc_ipsec_new_decap(priv->flc_desc[0].desc,
 				1, 0, SHR_SERIAL,
-- 
2.17.1


  parent reply	other threads:[~2019-10-11 16:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 16:32 [dpdk-dev] [PATCH 00/10] NXP DPAAx crypto fixes Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 01/10] test/crypto: fix PDCP test support Hemant Agrawal
2019-10-11 16:32 ` Hemant Agrawal [this message]
2019-10-11 16:32 ` [dpdk-dev] [PATCH 03/10] crypto/dpaa_sec: fix to check for aead as well Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 04/10] crypto/dpaa2_sec: enhance gcm descs to not skip aadt Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 05/10] crypto/dpaa2_sec: add support of auth trailer in cipher-auth Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 06/10] test/crypto: increase test cases support for dpaax Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 07/10] test/crypto: add test to test ESN like case Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 08/10] crypto/dpaa_sec: add support for snow3G and ZUC Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 09/10] test/crypto: enable snow3G and zuc cases for dpaa Hemant Agrawal
2019-10-11 16:32 ` [dpdk-dev] [PATCH 10/10] crypto/dpaa_sec: code reorg for better session mgmt Hemant Agrawal
2019-10-11 19:03   ` Aaron Conole
2019-10-14  4:57     ` Hemant Agrawal
2019-10-14  6:53 ` [dpdk-dev] [PATCH v2 00/10] NXP DPAAx crypto fixes Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 01/10] test/crypto: fix PDCP test support Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 02/10] crypto/dpaa2_sec: fix ipv6 support Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 03/10] crypto/dpaa_sec: fix to check for aead as well Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 04/10] crypto/dpaa2_sec: enhance gcm descs to not skip aadt Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 05/10] crypto/dpaa2_sec: add support of auth trailer in cipher-auth Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 06/10] test/crypto: increase test cases support for dpaax Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 07/10] test/crypto: add test to test ESN like case Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 08/10] crypto/dpaa_sec: add support for snow3G and ZUC Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 09/10] test/crypto: enable snow3G and zuc cases for dpaa Hemant Agrawal
2019-10-14  6:53   ` [dpdk-dev] [PATCH v2 10/10] crypto/dpaa_sec: code reorg for better session mgmt Hemant Agrawal
2019-10-15 12:50   ` [dpdk-dev] [PATCH v2 00/10] NXP DPAAx crypto fixes Akhil Goyal
2019-10-15 12:51     ` Akhil Goyal
2019-10-15 13:30       ` 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=20191011163233.31017-3-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).