patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Gregory Etelson <getelson@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' has been queued to stable release 21.11.2
Date: Fri, 24 Jun 2022 17:10:12 +0100	[thread overview]
Message-ID: <20220624161016.1881349-10-ktraynor@redhat.com> (raw)
In-Reply-To: <20220624161016.1881349-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/fac54fde60c2e54756207c34e5b23cb9ceaf27c6

Thanks.

Kevin

---
From fac54fde60c2e54756207c34e5b23cb9ceaf27c6 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Fri, 17 Jun 2022 08:22:38 +0300
Subject: [PATCH] net/mlx5: fix RSS expansion for patterns with ICMP item

[ upstream commit 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f ]

MLX5 PMD RSS expansion implementation added L4 UDP or TCP
headers after ICMP.
For example:
ETH / IPv4 / ICMP expanded into  ETH / IPv4 / ICMP / {UDP | TCP}
ETH / IPv6 / ICMPv6 expanded into  ETH / IPv6 / ICMPv6 / {UDP | TCP}

The patch updates PMD expansion scheme to handle ICMP and ICMPv6 types
as non-expandable for RSS.

Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3574358c72..94fb2d8c95 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -150,4 +150,6 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
 	case RTE_FLOW_ITEM_TYPE_UDP:
 	case RTE_FLOW_ITEM_TYPE_TCP:
+	case RTE_FLOW_ITEM_TYPE_ICMP:
+	case RTE_FLOW_ITEM_TYPE_ICMP6:
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
 	case RTE_FLOW_ITEM_TYPE_NVGRE:
@@ -559,7 +561,9 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_OUTER_IPV4_UDP,
 	MLX5_EXPANSION_OUTER_IPV4_TCP,
+	MLX5_EXPANSION_OUTER_IPV4_ICMP,
 	MLX5_EXPANSION_OUTER_IPV6,
 	MLX5_EXPANSION_OUTER_IPV6_UDP,
 	MLX5_EXPANSION_OUTER_IPV6_TCP,
+	MLX5_EXPANSION_OUTER_IPV6_ICMP6,
 	MLX5_EXPANSION_VXLAN,
 	MLX5_EXPANSION_STD_VXLAN,
@@ -575,7 +579,9 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_IPV4_UDP,
 	MLX5_EXPANSION_IPV4_TCP,
+	MLX5_EXPANSION_IPV4_ICMP,
 	MLX5_EXPANSION_IPV6,
 	MLX5_EXPANSION_IPV6_UDP,
 	MLX5_EXPANSION_IPV6_TCP,
+	MLX5_EXPANSION_IPV6_ICMP6,
 	MLX5_EXPANSION_IPV6_FRAG_EXT,
 	MLX5_EXPANSION_GTP,
@@ -612,4 +618,5 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			(MLX5_EXPANSION_OUTER_IPV4_UDP,
 			 MLX5_EXPANSION_OUTER_IPV4_TCP,
+			 MLX5_EXPANSION_OUTER_IPV4_ICMP,
 			 MLX5_EXPANSION_GRE,
 			 MLX5_EXPANSION_NVGRE,
@@ -633,8 +640,12 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_TCP,
 	},
+	[MLX5_EXPANSION_OUTER_IPV4_ICMP] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP,
+	},
 	[MLX5_EXPANSION_OUTER_IPV6] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT
 			(MLX5_EXPANSION_OUTER_IPV6_UDP,
 			 MLX5_EXPANSION_OUTER_IPV6_TCP,
+			 MLX5_EXPANSION_OUTER_IPV6_ICMP6,
 			 MLX5_EXPANSION_IPV4,
 			 MLX5_EXPANSION_IPV6,
@@ -658,4 +669,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV6_TCP,
 	},
+	[MLX5_EXPANSION_OUTER_IPV6_ICMP6] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP6,
+	},
 	[MLX5_EXPANSION_VXLAN] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
@@ -717,5 +731,6 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 	[MLX5_EXPANSION_IPV4] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4_UDP,
-						  MLX5_EXPANSION_IPV4_TCP),
+						  MLX5_EXPANSION_IPV4_TCP,
+						  MLX5_EXPANSION_IPV4_ICMP),
 		.type = RTE_FLOW_ITEM_TYPE_IPV4,
 		.rss_types = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_FRAG_IPV4 |
@@ -730,7 +745,11 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_TCP,
 	},
+	[MLX5_EXPANSION_IPV4_ICMP] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP,
+	},
 	[MLX5_EXPANSION_IPV6] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV6_UDP,
 						  MLX5_EXPANSION_IPV6_TCP,
+						  MLX5_EXPANSION_IPV6_ICMP6,
 						  MLX5_EXPANSION_IPV6_FRAG_EXT),
 		.type = RTE_FLOW_ITEM_TYPE_IPV6,
@@ -749,4 +768,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
 	},
+	[MLX5_EXPANSION_IPV6_ICMP6] = {
+		.type = RTE_FLOW_ITEM_TYPE_ICMP6,
+	},
 	[MLX5_EXPANSION_GTP] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 16:54:05.841280764 +0100
+++ 0010-net-mlx5-fix-RSS-expansion-for-patterns-with-ICMP-it.patch	2022-06-24 16:54:05.554165084 +0100
@@ -1 +1 @@
-From 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f Mon Sep 17 00:00:00 2001
+From fac54fde60c2e54756207c34e5b23cb9ceaf27c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57d6a458a8b8d2f41598b6f8f8d9459b34d1dd8f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 090de0366b..900ec8e4bc 100644
+index 3574358c72..94fb2d8c95 100644
@@ -28 +29,2 @@
-@@ -151,4 +151,6 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
+@@ -150,4 +150,6 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
+ 	case RTE_FLOW_ITEM_TYPE_UDP:
@@ -30 +31,0 @@
- 	case RTE_FLOW_ITEM_TYPE_ESP:
@@ -35 +36,2 @@
-@@ -564,8 +566,10 @@ enum mlx5_expansion {
+@@ -559,7 +561,9 @@ enum mlx5_expansion {
+ 	MLX5_EXPANSION_OUTER_IPV4_UDP,
@@ -37 +38,0 @@
- 	MLX5_EXPANSION_OUTER_IPV4_ESP,
@@ -42 +42,0 @@
- 	MLX5_EXPANSION_OUTER_IPV6_ESP,
@@ -46 +46,2 @@
-@@ -582,8 +586,10 @@ enum mlx5_expansion {
+@@ -575,7 +579,9 @@ enum mlx5_expansion {
+ 	MLX5_EXPANSION_IPV4_UDP,
@@ -48 +48,0 @@
- 	MLX5_EXPANSION_IPV4_ESP,
@@ -53 +52,0 @@
- 	MLX5_EXPANSION_IPV6_ESP,
@@ -57 +56,2 @@
-@@ -621,4 +627,5 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -612,4 +618,5 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 			(MLX5_EXPANSION_OUTER_IPV4_UDP,
@@ -59 +58,0 @@
- 			 MLX5_EXPANSION_OUTER_IPV4_ESP,
@@ -63,2 +62,2 @@
-@@ -646,4 +653,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.rss_types = RTE_ETH_RSS_ESP,
+@@ -633,8 +640,12 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_TCP,
@@ -71 +70 @@
-@@ -651,4 +661,5 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 			(MLX5_EXPANSION_OUTER_IPV6_UDP,
@@ -73 +71,0 @@
- 			 MLX5_EXPANSION_OUTER_IPV6_ESP,
@@ -77,2 +75,2 @@
-@@ -676,4 +687,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.rss_types = RTE_ETH_RSS_ESP,
+@@ -658,4 +669,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV6_TCP,
@@ -85 +83,2 @@
-@@ -736,5 +750,6 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -717,5 +731,6 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 	[MLX5_EXPANSION_IPV4] = {
@@ -87,3 +86,2 @@
- 						  MLX5_EXPANSION_IPV4_TCP,
--						  MLX5_EXPANSION_IPV4_ESP),
-+						  MLX5_EXPANSION_IPV4_ESP,
+-						  MLX5_EXPANSION_IPV4_TCP),
++						  MLX5_EXPANSION_IPV4_TCP,
@@ -93,2 +91,2 @@
-@@ -753,8 +768,12 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 		.rss_types = RTE_ETH_RSS_ESP,
+@@ -730,7 +745,11 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_TCP,
@@ -102 +99,0 @@
- 						  MLX5_EXPANSION_IPV6_ESP,
@@ -106 +103 @@
-@@ -777,4 +796,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -749,4 +768,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {


  parent reply	other threads:[~2022-06-24 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 16:10 patch 'malloc: fix allocation of almost hugepage size' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/octeontx: fix port close' " Kevin Traynor
2022-06-24 16:10 ` patch 'common/cnxk: fix decrypt packet count register update' " Kevin Traynor
2022-06-24 16:10 ` patch 'common/cnxk: handle ROC model init failure' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/qede: fix build with GCC 13' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/ice: fix race condition in Rx timestamp' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/ice/base: fix build with GCC 12' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/qede: " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix build with clang 14' " Kevin Traynor
2022-06-24 16:10 ` Kevin Traynor [this message]
2022-06-24 16:10 ` patch 'net/mlx5: add limitation for E-Switch Manager match' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix metering on E-Switch Manager' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix stack buffer overflow in drop action' " Kevin Traynor
2022-06-24 16:10 ` patch 'doc: fix flow integrity hardware support in mlx5 guide' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220624161016.1881349-10-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).