net/nfp: fix offload flags of the security capabilities

Message ID 20231028063140.1843291-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: fix offload flags of the security capabilities |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Chaoyong He Oct. 28, 2023, 6:31 a.m. UTC
  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(-)
  

Comments

Ferruh Yigit Nov. 1, 2023, 5:23 p.m. UTC | #1
On 10/28/2023 7:31 AM, Chaoyong He wrote:
> 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>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  

Patch

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