net/mlx5/hws: fix ESP matching validation

Message ID 20240115120938.3994588-1-michaelba@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5/hws: fix ESP matching validation |

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/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Michael Baum Jan. 15, 2024, 12:09 p.m. UTC
  The "mlx5dr_definer_conv_item_esp()" function validates first whether
"ipsec_offload" PRM flag is on, if the flag is off the function returns
error.

The "ipsec_offload" PRM flag indicates whether IPsec encrypt/decrypt is
supported, IPsec matching may be supported even when this flag is off.

This patch removes this validation.

Fixes: 81cf20a25abf ("net/mlx5/hws: support match on ESP item")
Cc: hamdani@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Hamdan Igbaria <hamdani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Raslan Darawsheh Jan. 17, 2024, 5:11 p.m. UTC | #1
Hi,
> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> Sent: Monday, January 15, 2024 2:10 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>;
> Suanming Mou <suanmingm@nvidia.com>; Hamdan Igbaria
> <hamdani@nvidia.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5/hws: fix ESP matching validation
> 
> The "mlx5dr_definer_conv_item_esp()" function validates first whether
> "ipsec_offload" PRM flag is on, if the flag is off the function returns
> error.
> 
> The "ipsec_offload" PRM flag indicates whether IPsec encrypt/decrypt is
> supported, IPsec matching may be supported even when this flag is off.
> 
> This patch removes this validation.
> 
> Fixes: 81cf20a25abf ("net/mlx5/hws: support match on ESP item")
> Cc: hamdani@nvidia.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Hamdan Igbaria <hamdani@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh
  
Slava Ovsiienko Jan. 18, 2024, 9:27 a.m. UTC | #2
HWS guys claimed this check was needed to make sure matcher works well on ESP.
Are we sure we can remove this ?


> -----Original Message-----
> From: Raslan Darawsheh <rasland@nvidia.com>
> Sent: Wednesday, January 17, 2024 7:12 PM
> To: Michael Baum <michaelba@nvidia.com>; dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Ori
> Kam <orika@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>; Hamdan
> Igbaria <hamdani@nvidia.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/mlx5/hws: fix ESP matching validation
> 
> Hi,
> > -----Original Message-----
> > From: Michael Baum <michaelba@nvidia.com>
> > Sent: Monday, January 15, 2024 2:10 PM
> > To: dev@dpdk.org
> > Cc: Matan Azrad <matan@nvidia.com>; Dariusz Sosnowski
> > <dsosnowski@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>; Slava
> > Ovsiienko <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>;
> > Suanming Mou <suanmingm@nvidia.com>; Hamdan Igbaria
> > <hamdani@nvidia.com>; stable@dpdk.org
> > Subject: [PATCH] net/mlx5/hws: fix ESP matching validation
> >
> > The "mlx5dr_definer_conv_item_esp()" function validates first whether
> > "ipsec_offload" PRM flag is on, if the flag is off the function
> > returns error.
> >
> > The "ipsec_offload" PRM flag indicates whether IPsec encrypt/decrypt
> > is supported, IPsec matching may be supported even when this flag is off.
> >
> > This patch removes this validation.
> >
> > Fixes: 81cf20a25abf ("net/mlx5/hws: support match on ESP item")
> > Cc: hamdani@nvidia.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Michael Baum <michaelba@nvidia.com>
> > Acked-by: Hamdan Igbaria <hamdani@nvidia.com>
> > Acked-by: Matan Azrad <matan@nvidia.com>
> Patch applied to next-net-mlx,
> 
> Kindest regards
> Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 0b60479406..7bd4ea560e 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -2240,11 +2240,6 @@  mlx5dr_definer_conv_item_esp(struct mlx5dr_definer_conv_data *cd,
 	const struct rte_flow_item_esp *m = item->mask;
 	struct mlx5dr_definer_fc *fc;
 
-	if (!cd->ctx->caps->ipsec_offload) {
-		rte_errno = ENOTSUP;
-		return rte_errno;
-	}
-
 	if (!m)
 		return 0;
 	if (m->hdr.spi) {