[dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Thu May 28 18:22:31 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/03/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/e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a

Thanks.

Kevin.

---
>From e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at mellanox.com>
Date: Mon, 23 Mar 2020 16:21:33 +0200
Subject: [PATCH] net/mlx5: fix validation of VXLAN/VXLAN-GPE specs

[ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ]

Trying to create zero spec for vni wasn't allowed, to
avoid matching all packets from previous layer (udp).
This behavior is incorrect, since VXLAN is being identified
through the outer UDP destination port.

Currently, if the user didn't specify outer UDP destination
port the PMD will automatically match only on  outer
UDP port of 4798, and if the user want to match on some none
standard port he need to specify it explicitly in the rule.

This removes the limitation of vni spec to be able to match any
vni.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 362fae56c4..0a0cd1be53 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1441,5 +1441,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
 		uint8_t vni[4];
 	} id = { .vlan_id = 0, };
-	uint32_t vlan_id = 0;
 
 
@@ -1468,21 +1467,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
 	if (spec) {
 		memcpy(&id.vni[1], spec->vni, 3);
-		vlan_id = id.vlan_id;
 		memcpy(&id.vni[1], mask->vni, 3);
-		vlan_id &= id.vlan_id;
 	}
-	/*
-	 * Tunnel id 0 is equivalent as not adding a VXLAN layer, if
-	 * only this layer is defined in the Verbs specification it is
-	 * interpreted as wildcard and all packets will match this
-	 * rule, if it follows a full stack layer (ex: eth / ipv4 /
-	 * udp), all packets matching the layers before will also
-	 * match this rule.  To avoid such situation, VNI 0 is
-	 * currently refused.
-	 */
-	if (!vlan_id)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-					  "VXLAN vni cannot be 0");
 	if (!(item_flags & MLX5_FLOW_LAYER_OUTER))
 		return rte_flow_error_set(error, ENOTSUP,
@@ -1523,5 +1507,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
 		uint8_t vni[4];
 	} id = { .vlan_id = 0, };
-	uint32_t vlan_id = 0;
 
 	if (!priv->config.l3_vxlan_en)
@@ -1561,20 +1544,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
 						  " not supported");
 		memcpy(&id.vni[1], spec->vni, 3);
-		vlan_id = id.vlan_id;
 		memcpy(&id.vni[1], mask->vni, 3);
-		vlan_id &= id.vlan_id;
 	}
-	/*
-	 * Tunnel id 0 is equivalent as not adding a VXLAN layer, if only this
-	 * layer is defined in the Verbs specification it is interpreted as
-	 * wildcard and all packets will match this rule, if it follows a full
-	 * stack layer (ex: eth / ipv4 / udp), all packets matching the layers
-	 * before will also match this rule.  To avoid such situation, VNI 0
-	 * is currently refused.
-	 */
-	if (!vlan_id)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-					  "VXLAN-GPE vni cannot be 0");
 	if (!(item_flags & MLX5_FLOW_LAYER_OUTER))
 		return rte_flow_error_set(error, ENOTSUP,
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-28 17:13:01.412417524 +0100
+++ 0044-net-mlx5-fix-validation-of-VXLAN-VXLAN-GPE-specs.patch	2020-05-28 17:12:59.112556151 +0100
@@ -1 +1 @@
-From c79ab350a8976718d477d616f06678872a29b1b2 Mon Sep 17 00:00:00 2001
+From e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 41072da6df..2ef6558495 100644
+index 362fae56c4..0a0cd1be53 100644
@@ -32 +33 @@
-@@ -1837,5 +1837,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
+@@ -1441,5 +1441,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
@@ -38 +39 @@
-@@ -1864,21 +1863,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
+@@ -1468,21 +1467,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
@@ -60 +61 @@
-@@ -1919,5 +1903,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
+@@ -1523,5 +1507,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
@@ -66 +67 @@
-@@ -1957,20 +1940,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
+@@ -1561,20 +1544,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,



More information about the stable mailing list