patch 'net/mlx5: fix GRE flow item matching' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:54:16 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/7d4d3d56e969f262d11775afa3a303d4dadde445

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 7d4d3d56e969f262d11775afa3a303d4dadde445 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at nvidia.com>
Date: Wed, 24 Nov 2021 06:32:34 +0200
Subject: [PATCH] net/mlx5: fix GRE flow item matching
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f ]

GRE protocol type is implicitly set in the matching translation in case
an application doesn't specify any type explicitly in a flow rule.
It is extracted from the inner header type, but this type may be absent.
In this case, GRE item matching is broken. Check if we have the inner
header type before setting it to allow matching on all GRE packets.

Fixes: be26e81bfc1c ("net/mlx5: fix GRE protocol type translation")

Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8804b9816d..582cddf62b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7062,8 +7062,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,
 	protocol_v = rte_be_to_cpu_16(gre_v->protocol);
 	if (!protocol_m) {
 		/* Force next protocol to prevent matchers duplication */
-		protocol_m = 0xFFFF;
 		protocol_v = mlx5_translate_tunnel_etypes(pattern_flags);
+		if (protocol_v)
+			protocol_m = 0xFFFF;
 	}
 	MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, protocol_m);
 	MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.861847095 +0800
+++ 0072-net-mlx5-fix-GRE-flow-item-matching.patch	2021-11-28 22:41:03.440205474 +0800
@@ -1 +1 @@
-From 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f Mon Sep 17 00:00:00 2001
+From 7d4d3d56e969f262d11775afa3a303d4dadde445 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 9979d16f74..1a9c040f3c 100644
+index 8804b9816d..582cddf62b 100644
@@ -25 +27 @@
-@@ -8823,8 +8823,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,
+@@ -7062,8 +7062,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,


More information about the stable mailing list