[dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:41 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

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/10/20. 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-queue

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

Thanks.

Kevin.

---
>From 9ff1e11cb7ae3314f1954cd5506faffa208fe543 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at mellanox.com>
Date: Wed, 6 May 2020 09:57:56 +0300
Subject: [PATCH] net/mlx5: fix matching for UDP tunnels with Verbs

[ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ]

When creating flow rule with zero specs it will cause
matching all UDP packets like following:
 eth / ipv4 / udp / vxlan / end
Such rule will match all udp packets.

This change the behavior to match the dv flow engine
which will automatically set the match on relative
outer UDP port if the user didn't specify any.

Fixes: 84c406e74524 ("net/mlx5: add flow translate function")

Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_verbs.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 05a3db501f..eb740290d4 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -573,4 +573,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,
 		udp.val.dst_port &= udp.mask.dst_port;
 	}
+	item++;
+	while (item->type == RTE_FLOW_ITEM_TYPE_VOID)
+		item++;
+	if (!(udp.val.dst_port & udp.mask.dst_port)) {
+		switch ((item)->type) {
+		case RTE_FLOW_ITEM_TYPE_VXLAN:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN);
+			udp.mask.dst_port = 0xffff;
+			break;
+		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN_GPE);
+			udp.mask.dst_port = 0xffff;
+			break;
+		case RTE_FLOW_ITEM_TYPE_MPLS:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_MPLS);
+			udp.mask.dst_port = 0xffff;
+			break;
+		default:
+			break;
+		}
+	}
+
 	flow_verbs_spec_add(&dev_flow->verbs, &udp, size);
 }
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:53.248504762 +0100
+++ 0044-net-mlx5-fix-matching-for-UDP-tunnels-with-Verbs.patch	2020-06-05 19:20:50.822040541 +0100
@@ -1 +1 @@
-From 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 Mon Sep 17 00:00:00 2001
+From 9ff1e11cb7ae3314f1954cd5506faffa208fe543 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 4659f0a7f7..c403f72be3 100644
+index 05a3db501f..eb740290d4 100644
@@ -28 +29 @@
-@@ -681,4 +681,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,
+@@ -573,4 +573,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,



More information about the stable mailing list