[dpdk-stable] patch 'net/mlx5: fix VLAN VID action validation' has been queued to stable release 19.11.1
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Feb 11 12:21:37 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/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 31cb74256a053f75499408ab5b9f2a3f34c10955 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at mellanox.com>
Date: Wed, 22 Jan 2020 16:27:21 +0200
Subject: [PATCH] net/mlx5: fix VLAN VID action validation
[ upstream commit 5a2ab34d81c2bd07539ae7cb5167498617909d42 ]
Validation function of 'set VLAN VID' action checks twice for existing
same action in flow rule.
This patch updates the validation function logic, to check the same
restrictions more efficiently.
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Ori Kam <orika at mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index db86623651..8a9a872ac6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1686,10 +1686,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
*
* @param[in] item_flags
* Holds the items detected in this rule.
+ * @param[in] action_flags
+ * Holds the actions detected until now.
* @param[in] actions
* Pointer to the list of actions remaining in the flow rule.
- * @param[in] attr
- * Pointer to flow attributes
* @param[out] error
* Pointer to error structure.
*
@@ -1709,33 +1709,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"VLAN VID value is too big");
- /* there is an of_push_vlan action before us */
- if (action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN) {
- if (mlx5_flow_find_action(actions + 1,
- RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID))
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ACTION, action,
- "Multiple VLAN VID modifications are "
- "not supported");
- else
- return 0;
- }
-
- /*
- * Action is on an existing VLAN header:
- * Need to verify this is a single modify CID action.
- * Rule mast include a match on outer VLAN.
- */
+ if (!(action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN) &&
+ !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
+ return rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "set VLAN VID action must follow push"
+ " VLAN action or match on VLAN item");
if (action_flags & MLX5_FLOW_ACTION_OF_SET_VLAN_VID)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"Multiple VLAN VID modifications are "
"not supported");
- if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION, action,
- "match on VLAN is required in order "
- "to set VLAN VID");
if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.882599399 +0000
+++ 0151-net-mlx5-fix-VLAN-VID-action-validation.patch 2020-02-11 11:17:38.708007106 +0000
@@ -1,8 +1,10 @@
-From 5a2ab34d81c2bd07539ae7cb5167498617909d42 Mon Sep 17 00:00:00 2001
+From 31cb74256a053f75499408ab5b9f2a3f34c10955 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at mellanox.com>
Date: Wed, 22 Jan 2020 16:27:21 +0200
Subject: [PATCH] net/mlx5: fix VLAN VID action validation
+[ upstream commit 5a2ab34d81c2bd07539ae7cb5167498617909d42 ]
+
Validation function of 'set VLAN VID' action checks twice for existing
same action in flow rule.
@@ -11,7 +13,6 @@
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
-Cc: stable at dpdk.org
Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Ori Kam <orika at mellanox.com>
@@ -21,10 +22,10 @@
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index de4b765a0e..4b6a92c83c 100644
+index db86623651..8a9a872ac6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1815,10 +1815,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
+@@ -1686,10 +1686,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
*
* @param[in] item_flags
* Holds the items detected in this rule.
@@ -37,7 +38,7 @@
* @param[out] error
* Pointer to error structure.
*
-@@ -1838,33 +1838,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
+@@ -1709,33 +1709,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"VLAN VID value is too big");
More information about the stable
mailing list