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

Message ID 20240707101342.49823-1-getelson@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix IPv6-in-IPv6 tunnel recognition |

Checks

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

Commit Message

Gregory Etelson July 7, 2024, 10:13 a.m. UTC
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")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Raslan Darawsheh July 18, 2024, 7:24 a.m. UTC | #1
Hi,

From: Gregory Etelson <getelson@nvidia.com>
Sent: Sunday, July 7, 2024 1:13 PM
To: dev@dpdk.org
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")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ad8d73a089..7c9ba4e819 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -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 {