Skip to contentSkip to conversation

net/mlx5/hws: fix ESP matching validation

PATCH In review Michael Baum 3 participants 3 messages Jan 15, 2024 – Jan 18, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/net/mlx5/hws/mlx5dr_definer.c +0 -5
index 0b60479406..7bd4ea560e 100644
@@ -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) {
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Quoted 20 lines

-----Original Message-----
From: Michael Baum <[email protected]>
Sent: Monday, January 15, 2024 2:10 PM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Dariusz Sosnowski <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Hamdan Igbaria <[email protected]>; [email protected]
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.

Quoted 7 lines
Fixes 81cf20a25abf ("net/mlx5/hws: support match on ESP item")

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh

#2 lore raw

HWS guys claimed this check was needed to make sure matcher works well on ESP. Are we sure we can remove this ?

Quoted 42 lines

-----Original Message-----
From: Raslan Darawsheh <[email protected]>
Sent: Wednesday, January 17, 2024 7:12 PM
To: Michael Baum <[email protected]>; [email protected]
Cc: Matan Azrad <[email protected]>; Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Hamdan Igbaria <[email protected]>; [email protected]
Subject: RE: [PATCH] net/mlx5/hws: fix ESP matching validation

Hi,

Quoted 20 lines

-----Original Message-----
From: Michael Baum <[email protected]>
Sent: Monday, January 15, 2024 2:10 PM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Dariusz Sosnowski <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Hamdan Igbaria <[email protected]>; [email protected]
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.

Quoted 7 lines
Fixes 81cf20a25abf ("net/mlx5/hws: support match on ESP item")

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh