DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com,
	Shihong Wang <shihong.wang@corigine.com>,
	stable@dpdk.org, Chaoyong He <chaoyong.he@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH] net/nfp: fix offload flags of the security capabilities
Date: Sat, 28 Oct 2023 14:31:40 +0800	[thread overview]
Message-ID: <20231028063140.1843291-1-chaoyong.he@corigine.com> (raw)

From: Shihong Wang <shihong.wang@corigine.com>

This patch resolves configuration error of ol_flags in the
rte_security_capability. Currently ol_flags in the ingress direction
of the SA, 'RTE_SECURITY_TX_OLOAD_NEED_MDATA' is configured. In fact,
ol_flags only in the egress direction of the SA needs to be configured.

Fixes: e6d69ea011c9 ("net/nfp: get security capabilities and session size")
Cc: stable@dpdk.org

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ipsec.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c
index a76ba2a91d..302962c58b 100644
--- a/drivers/net/nfp/nfp_ipsec.c
+++ b/drivers/net/nfp/nfp_ipsec.c
@@ -242,7 +242,8 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps
+		.crypto_capabilities = nfp_crypto_caps,
+		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
 	},
 	{ /* IPsec Inline Crypto Tunnel Ingress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO,
@@ -257,8 +258,7 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps,
-		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
+		.crypto_capabilities = nfp_crypto_caps
 	},
 	{ /* IPsec Inline Crypto Transport Egress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO,
@@ -273,7 +273,8 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps
+		.crypto_capabilities = nfp_crypto_caps,
+		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
 	},
 	{ /* IPsec Inline Crypto Transport Ingress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO,
@@ -288,8 +289,7 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps,
-		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
+		.crypto_capabilities = nfp_crypto_caps
 	},
 	{ /* IPsec Inline Protocol Tunnel Egress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
@@ -304,7 +304,8 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps
+		.crypto_capabilities = nfp_crypto_caps,
+		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
 	},
 	{ /* IPsec Inline Protocol Tunnel Ingress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
@@ -319,8 +320,7 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps,
-		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
+		.crypto_capabilities = nfp_crypto_caps
 	},
 	{ /* IPsec Inline Protocol Transport Egress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
@@ -335,7 +335,8 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps
+		.crypto_capabilities = nfp_crypto_caps,
+		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
 	},
 	{ /* IPsec Inline Protocol Transport Ingress */
 		.action = RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
@@ -350,8 +351,7 @@ static const struct rte_security_capability nfp_security_caps[] = {
 				.esn = 1
 				}
 		},
-		.crypto_capabilities = nfp_crypto_caps,
-		.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA
+		.crypto_capabilities = nfp_crypto_caps
 	},
 	{
 		.action = RTE_SECURITY_ACTION_TYPE_NONE
-- 
2.39.1


             reply	other threads:[~2023-10-28  6:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28  6:31 Chaoyong He [this message]
2023-11-01 17:23 ` Ferruh Yigit

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=20231028063140.1843291-1-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    --cc=shihong.wang@corigine.com \
    --cc=stable@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).