[dpdk-stable] patch 'net/mlx5: fix VLAN pop with decap action validation' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 14:00:11 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 07/26/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.

Thanks.

Luca Boccassi

---
>From 2e5ccbf2ee47f0a9771e7572e76f0f1cbbebdcea Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at mellanox.com>
Date: Wed, 15 Jul 2020 10:30:33 +0300
Subject: [PATCH] net/mlx5: fix VLAN pop with decap action validation

[ upstream commit dd6745da6dea7c3e954ed4e93ba161416ccd3a80 ]

The combination of decap action followed by pop VLAN action is not
fully validated in existing code.

This patch updates the validation function of pop vlan action.
Pop VLAN with preceding Decap requires inner header with VLAN.
Pop VLAN without preceding Decap requires outer header with VLAN.

Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")

Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 930e16026..2407f8723 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1682,7 +1682,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "no support for multiple VLAN "
 					  "actions");
-	if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
+	/* Pop VLAN with preceding Decap requires inner header with VLAN. */
+	if ((action_flags & MLX5_FLOW_ACTION_DECAP) &&
+	    !(item_flags & MLX5_FLOW_LAYER_INNER_VLAN))
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					  NULL,
+					  "cannot pop vlan after decap without "
+					  "match on inner vlan in the flow");
+	/* Pop VLAN without preceding Decap requires outer header with VLAN. */
+	if (!(action_flags & MLX5_FLOW_ACTION_DECAP) &&
+	    !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.222927542 +0100
+++ 0173-net-mlx5-fix-VLAN-pop-with-decap-action-validation.patch	2020-07-24 12:53:48.583011974 +0100
@@ -1,8 +1,10 @@
-From dd6745da6dea7c3e954ed4e93ba161416ccd3a80 Mon Sep 17 00:00:00 2001
+From 2e5ccbf2ee47f0a9771e7572e76f0f1cbbebdcea Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp at mellanox.com>
 Date: Wed, 15 Jul 2020 10:30:33 +0300
 Subject: [PATCH] net/mlx5: fix VLAN pop with decap action validation
 
+[ upstream commit dd6745da6dea7c3e954ed4e93ba161416ccd3a80 ]
+
 The combination of decap action followed by pop VLAN action is not
 fully validated in existing code.
 
@@ -11,7 +13,6 @@
 Pop VLAN without preceding Decap requires outer header with VLAN.
 
 Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable at dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -20,10 +21,10 @@
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 778a766cd..5ba788a33 100644
+index 930e16026..2407f8723 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1832,7 +1832,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1682,7 +1682,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
  					  "no support for multiple VLAN "
  					  "actions");


More information about the stable mailing list