Skip to contentSkip to conversation

net/mlx5: fix IPv6-in-IPv6 tunnel recognition

PATCH In review Gregory Etelson 2 participants 2 messages Jul 7, 2024 – Jul 18, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix IPv6-in-IPv6 tunnel recognition

The PMD did not recognize IPv6-in-IPv6 tunnel if IPv6 routing extension was placed between IPv6 outer and inner headers.

The patch fixes IPv6-in-IPv6 tunnel recognition.

Fixes 80c676259a04 ("net/mlx5: validate HWS template items")
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow_hw.c +2 -1
index ad8d73a089..7c9ba4e819 100644
@@ -8228,7 +8228,8 @@ mlx5_hw_flow_tunnel_ip_check(uint64_t last_item, uint64_t *item_flags)
 	if (last_item == MLX5_FLOW_LAYER_OUTER_L3_IPV4) {
 		tunnel = true;
 		*item_flags |= MLX5_FLOW_LAYER_IPIP;
-	} else if (last_item == MLX5_FLOW_LAYER_OUTER_L3_IPV6) {
+	} else if (last_item == MLX5_FLOW_LAYER_OUTER_L3_IPV6 ||
+		   last_item == MLX5_FLOW_ITEM_OUTER_IPV6_ROUTING_EXT) {
 		tunnel = true;
 		*item_flags |= MLX5_FLOW_LAYER_IPV6_ENCAP;
 	} else {
Signature · 1 line
2.43.0
Acked-by Dariusz Sosnowski on v1 1/1
#1 lore raw

Hi,

From: Gregory Etelson <[email protected]>
Sent: Sunday, July 7, 2024 1:13 PM
To: [email protected]
Cc: Gregory Etelson; Maayan Kashani; Raslan Darawsheh; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Subject: [PATCH] net/mlx5: fix IPv6-in-IPv6 tunnel recognition

The PMD did not recognize IPv6-in-IPv6 tunnel if IPv6 routing extension was placed between IPv6 outer and inner headers.

The patch fixes IPv6-in-IPv6 tunnel recognition.

Fixes 80c676259a04 ("net/mlx5: validate HWS template items")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh