patch 'net/mlx5: fix GENEVE and VXLAN-GPE flow item matching' has been queued to stable release 20.11.4

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4bcae288d566dc05afbec4f3525d981fa82842fe Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev at nvidia.com>
Date: Wed, 24 Nov 2021 15:26:09 +0200
Subject: [PATCH] net/mlx5: fix GENEVE and VXLAN-GPE flow item matching
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 94421842de9a821778b95b928945ed8ea382302d ]

GENEVE and VXLAN-GPE item matching is done similarly to GRE matching.
Users can skip the specification of the protocol type and expect that
this type is deducted from the inner header type automatically.
But the inner header type may not be specified in order to match all the
protocol types. In this case, PMD should not specify the protocol type.
Check if we have the inner header type before setting the protocol type.

Fixes: 690391dd0e8b ("net/mlx5: fix GENEVE protocol type translation")
Fixes: 861fa3796f75 ("net/mlx5: fix VXLAN-GPE next protocol 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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 582cddf62b..c9711d6e77 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7245,7 +7245,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 	m_protocol = vxlan_m->protocol;
 	v_protocol = vxlan_v->protocol;
 	if (!m_protocol) {
-		m_protocol = 0xff;
 		/* Force next protocol to ensure next headers parsing. */
 		if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
 			v_protocol = RTE_VXLAN_GPE_TYPE_ETH;
@@ -7253,6 +7252,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 			v_protocol = RTE_VXLAN_GPE_TYPE_IPV4;
 		else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
 			v_protocol = RTE_VXLAN_GPE_TYPE_IPV6;
+		if (v_protocol)
+			m_protocol = 0xFF;
 	}
 	MLX5_SET(fte_match_set_misc3, misc_m,
 		 outer_vxlan_gpe_next_protocol, m_protocol);
@@ -7323,8 +7324,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
 	protocol_v = rte_be_to_cpu_16(geneve_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, geneve_protocol_type, protocol_m);
 	MLX5_SET(fte_match_set_misc, misc_v, geneve_protocol_type,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.913861702 +0800
+++ 0073-net-mlx5-fix-GENEVE-and-VXLAN-GPE-flow-item-matching.patch	2021-11-28 22:41:03.450205293 +0800
@@ -1 +1 @@
-From 94421842de9a821778b95b928945ed8ea382302d Mon Sep 17 00:00:00 2001
+From 4bcae288d566dc05afbec4f3525d981fa82842fe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 94421842de9a821778b95b928945ed8ea382302d ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 1a9c040f3c..3da122cbb9 100644
+index 582cddf62b..c9711d6e77 100644
@@ -27 +29 @@
-@@ -9057,7 +9057,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+@@ -7245,7 +7245,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -35 +37 @@
-@@ -9065,6 +9064,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+@@ -7253,6 +7252,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -44 +46 @@
-@@ -9135,8 +9136,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
+@@ -7323,8 +7324,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,


More information about the stable mailing list