patch 'net/mlx5: add Ethernet header to GENEVE RSS expansion' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:49 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae9d83d713a8861f4dee8cf86f91ff125b488655

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ae9d83d713a8861f4dee8cf86f91ff125b488655 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Sun, 14 Nov 2021 17:36:13 +0200
Subject: [PATCH] net/mlx5: add Ethernet header to GENEVE RSS expansion
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 9f151fd8dfb30946a00f6ac273df93db14d1b45d ]

RFC-8926 allows inner Ethernet header after GENEVE tunnel.

Current GENEVE RSS expansion created IPv4 and IPv6 paths only.

The patch adds Ethernet to RSS expansion scheme.

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b8e11a43f5..21f018dd1d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -237,6 +237,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 		else
 			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
+	case RTE_FLOW_ITEM_TYPE_GENEVE:
+		ether_type_m = item->mask ?
+			       ((const struct rte_flow_item_geneve *)
+			       (item->mask))->protocol :
+			       rte_flow_item_geneve_mask.protocol;
+		ether_type = ((const struct rte_flow_item_geneve *)
+			     (item->spec))->protocol;
+		ether_type_m = rte_be_to_cpu_16(ether_type_m);
+		ether_type = rte_be_to_cpu_16(ether_type);
+		switch (ether_type_m & ether_type) {
+		case RTE_ETHER_TYPE_TEB:
+			ret = RTE_FLOW_ITEM_TYPE_ETH;
+			break;
+		case RTE_ETHER_TYPE_IPV4:
+			ret = RTE_FLOW_ITEM_TYPE_IPV4;
+			break;
+		case RTE_ETHER_TYPE_IPV6:
+			ret = RTE_FLOW_ITEM_TYPE_IPV6;
+			break;
+		default:
+			ret = RTE_FLOW_ITEM_TYPE_END;
+		}
+		break;
 	default:
 		ret = RTE_FLOW_ITEM_TYPE_VOID;
 		break;
@@ -456,7 +479,8 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_IPV6_UDP,
 	MLX5_EXPANSION_IPV6_TCP,
 	MLX5_EXPANSION_IPV6_FRAG_EXT,
-	MLX5_EXPANSION_GTP
+	MLX5_EXPANSION_GTP,
+	MLX5_EXPANSION_GENEVE,
 };
 
 /** Supported expansion of items. */
@@ -514,6 +538,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
 						  MLX5_EXPANSION_VXLAN_GPE,
 						  MLX5_EXPANSION_MPLS,
+						  MLX5_EXPANSION_GENEVE,
 						  MLX5_EXPANSION_GTP),
 		.type = RTE_FLOW_ITEM_TYPE_UDP,
 		.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
@@ -538,6 +563,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
 						  MLX5_EXPANSION_VXLAN_GPE,
 						  MLX5_EXPANSION_MPLS,
+						  MLX5_EXPANSION_GENEVE,
 						  MLX5_EXPANSION_GTP),
 		.type = RTE_FLOW_ITEM_TYPE_UDP,
 		.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
@@ -634,7 +660,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
 							  MLX5_EXPANSION_IPV6),
 			.type = RTE_FLOW_ITEM_TYPE_GTP
-	}
+	},
+	[MLX5_EXPANSION_GENEVE] = {
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
+						  MLX5_EXPANSION_IPV4,
+						  MLX5_EXPANSION_IPV6),
+		.type = RTE_FLOW_ITEM_TYPE_GENEVE,
+	},
 };
 
 static struct rte_flow_shared_action *
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.662242319 +0800
+++ 0045-net-mlx5-add-Ethernet-header-to-GENEVE-RSS-expansion.patch	2021-11-28 22:41:03.340207285 +0800
@@ -1 +1 @@
-From 9f151fd8dfb30946a00f6ac273df93db14d1b45d Mon Sep 17 00:00:00 2001
+From ae9d83d713a8861f4dee8cf86f91ff125b488655 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9f151fd8dfb30946a00f6ac273df93db14d1b45d ]
@@ -12,2 +14,0 @@
-Cc: stable at dpdk.org
-
@@ -17,2 +18,2 @@
- drivers/net/mlx5/mlx5_flow.c | 34 +++++++++++++++++++++++++++++++++-
- 1 file changed, 33 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/mlx5_flow.c | 36 ++++++++++++++++++++++++++++++++++--
+ 1 file changed, 34 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index f657980737..205fe19cdd 100644
+index b8e11a43f5..21f018dd1d 100644
@@ -24 +25 @@
-@@ -258,6 +258,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -237,6 +237,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -54 +55 @@
-@@ -530,7 +553,8 @@ enum mlx5_expansion {
+@@ -456,7 +479,8 @@ enum mlx5_expansion {
@@ -64 +65 @@
-@@ -574,6 +598,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -514,6 +538,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
@@ -71,2 +72,2 @@
- 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_UDP,
-@@ -598,6 +623,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
+@@ -538,6 +563,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
@@ -79,5 +80,7 @@
- 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV6_UDP,
-@@ -701,6 +727,12 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 						  MLX5_EXPANSION_IPV6),
- 		.type = RTE_FLOW_ITEM_TYPE_GTP,
- 	},
+ 		.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
+@@ -634,7 +660,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+ 							  MLX5_EXPANSION_IPV6),
+ 			.type = RTE_FLOW_ITEM_TYPE_GTP
+-	}
++	},
@@ -92 +95 @@
- static struct rte_flow_action_handle *
+ static struct rte_flow_shared_action *


More information about the stable mailing list