patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:56   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

PUSH_VLAN and POP_VLAN actions flags were added to ENCAP_ACTIONS
and DECAP_ACTIONS bit masks, respectively.
This is incorrect, because VLAN actions are considered as 'modify
header' actions, not as 'packet reformat' actions.

This patch removes the PUSH_VLAN and POP_VLAN actions flags from
ENCAP_ACTIONS and DECAP_ACTIONS bit masks.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 9832542..f771cac 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -212,13 +212,11 @@ enum mlx5_feature_name {
 
 #define MLX5_FLOW_ENCAP_ACTIONS	(MLX5_FLOW_ACTION_VXLAN_ENCAP | \
 				 MLX5_FLOW_ACTION_NVGRE_ENCAP | \
-				 MLX5_FLOW_ACTION_RAW_ENCAP | \
-				 MLX5_FLOW_ACTION_OF_PUSH_VLAN)
+				 MLX5_FLOW_ACTION_RAW_ENCAP)
 
 #define MLX5_FLOW_DECAP_ACTIONS	(MLX5_FLOW_ACTION_VXLAN_DECAP | \
 				 MLX5_FLOW_ACTION_NVGRE_DECAP | \
-				 MLX5_FLOW_ACTION_RAW_DECAP | \
-				 MLX5_FLOW_ACTION_OF_POP_VLAN)
+				 MLX5_FLOW_ACTION_RAW_DECAP)
 
 #define MLX5_FLOW_MODIFY_HDR_ACTIONS (MLX5_FLOW_ACTION_SET_IPV4_SRC | \
 				      MLX5_FLOW_ACTION_SET_IPV4_DST | \
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:56   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate Dekel Peled
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Flow validation function includes, after all items and actions are
validated discretely, a check for VLAN and VXLAN actions.
This check is incorrect and redundant.

This patch removes the invalid check from validation function.
Check is incorrect, action_flags bit map is checked against
items mask MLX5_FLOW_LAYER_TUNNEL.
Check is also redundant, because VLAN push/pop actions can be used
together with packet reformat actions.

Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5a1b426..afa3d0e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5060,13 +5060,6 @@ struct field_modify_info modify_tcp[] = {
 						  "action not supported");
 		}
 	}
-	if ((action_flags & MLX5_FLOW_LAYER_TUNNEL) &&
-	    (action_flags & MLX5_FLOW_VLAN_ACTIONS))
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
-					  actions,
-					  "can't have vxlan and vlan"
-					  " actions in the same rule");
 	/* Eswitch has few restrictions on using items and actions */
 	if (attr->transfer) {
 		if (!mlx5_flow_ext_mreg_supported(dev) &&
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:56   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value Dekel Peled
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Validation function of 'push VLAN' action uses (POP_VLAN or PUSH_VLAN)
actions flags, instead of using a mask of both flags.

This patch replaces it to use existing VLAN_ACTIONS mask.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index afa3d0e..d7176c8 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1746,8 +1746,7 @@ struct field_modify_info modify_tcp[] = {
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "invalid vlan ethertype");
-	if (action_flags &
-		(MLX5_FLOW_ACTION_OF_POP_VLAN | MLX5_FLOW_ACTION_OF_PUSH_VLAN))
+	if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "no support for multiple VLAN "
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
                   ` (2 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:57   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx Dekel Peled
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Currently the push VLAN action requires a VID value, either from
existing VLAN item, or from following 'set VLAN vid' action.

This patch removes this limitation, allowing a push VLAN action with
vid value 0.

Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d7176c8..59ece01 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1734,7 +1734,7 @@ struct field_modify_info modify_tcp[] = {
  */
 static int
 flow_dv_validate_action_push_vlan(uint64_t action_flags,
-				  uint64_t item_flags,
+				  uint64_t item_flags __rte_unused,
 				  const struct rte_flow_action *action,
 				  const struct rte_flow_attr *attr,
 				  struct rte_flow_error *error)
@@ -1751,14 +1751,6 @@ struct field_modify_info modify_tcp[] = {
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "no support for multiple VLAN "
 					  "actions");
-	if (!mlx5_flow_find_action
-			(action + 1, RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID) &&
-	    !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
-		return rte_flow_error_set(error, ENOTSUP,
-				RTE_FLOW_ERROR_TYPE_ACTION, action,
-				"push VLAN needs to match on VLAN in order to "
-				"get VLAN VID information because there is "
-				"no followed set VLAN VID action");
 	if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
                   ` (3 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:57   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx Dekel Peled
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Add missing check in validation function of 'push VLAN' action.
Action is not allowed for ingress flow rules.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b0d5688..1ed677f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1741,6 +1741,12 @@ struct field_modify_info modify_tcp[] = {
 {
 	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
 
+	if (attr->ingress)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
+					  NULL,
+					  "push VLAN action not supported for "
+					  "ingress");
 	if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) &&
 	    push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_QINQ))
 		return rte_flow_error_set(error, EINVAL,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
                   ` (4 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:57   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Add missing check in validation function of 'pop VLAN' action.
Action is not allowed for egress flow rules.

Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1ed677f..9dc08ce 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1634,6 +1634,12 @@ struct field_modify_info modify_tcp[] = {
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
 					  "pop vlan action is not supported");
+	if (attr->egress)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
+					  NULL,
+					  "pop vlan action not supported for "
+					  "egress");
 	/*
 	 * Check for inconsistencies:
 	 *  fail strip_vlan in a flow that matches packets without VLAN tags.
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
                   ` (5 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:57   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

Validation function of 'POP VLAN' action includes check for other
'POP VLAN' actions present in flow.
It doesn't check for 'PUSH VLAN' actions present in flow.

This patch adds check for 'PUSH VLAN' actions present in flow.

Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9dc08ce..de4b765 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1640,17 +1640,10 @@ struct field_modify_info modify_tcp[] = {
 					  NULL,
 					  "pop vlan action not supported for "
 					  "egress");
-	/*
-	 * Check for inconsistencies:
-	 *  fail strip_vlan in a flow that matches packets without VLAN tags.
-	 *  fail strip_vlan in a flow that matches packets without explicitly a
-	 *  matching on VLAN tag ?
-	 */
-	if (action_flags & MLX5_FLOW_ACTION_OF_POP_VLAN)
+	if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
-					  NULL,
-					  "no support for multiple vlan pop "
+					  RTE_FLOW_ERROR_TYPE_ACTION, action,
+					  "no support for multiple VLAN "
 					  "actions");
 	if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
 		return rte_flow_error_set(error, ENOTSUP,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation
       [not found] <cover.1579703134.git.dekelp@mellanox.com>
                   ` (6 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:58   ` Slava Ovsiienko
  7 siblings, 1 reply; 16+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@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 de4b765..4b6a92c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1815,10 +1815,10 @@ struct field_modify_info modify_tcp[] = {
  *
  * @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.
  *
@@ -1838,33 +1838,17 @@ struct field_modify_info modify_tcp[] = {
 		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,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
@ 2020-01-23  7:56   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:56 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 01/11] net/mlx5: fix masks of encap and decap actions
> 
> PUSH_VLAN and POP_VLAN actions flags were added to ENCAP_ACTIONS and
> DECAP_ACTIONS bit masks, respectively.
> This is incorrect, because VLAN actions are considered as 'modify header'
> actions, not as 'packet reformat' actions.
> 
> This patch removes the PUSH_VLAN and POP_VLAN actions flags from
> ENCAP_ACTIONS and DECAP_ACTIONS bit masks.
> 
> Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
> Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow.h | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
> index 9832542..f771cac 100644
> --- a/drivers/net/mlx5/mlx5_flow.h
> +++ b/drivers/net/mlx5/mlx5_flow.h
> @@ -212,13 +212,11 @@ enum mlx5_feature_name {
> 
>  #define MLX5_FLOW_ENCAP_ACTIONS	(MLX5_FLOW_ACTION_VXLAN_ENCAP
> | \
>  				 MLX5_FLOW_ACTION_NVGRE_ENCAP | \
> -				 MLX5_FLOW_ACTION_RAW_ENCAP | \
> -				 MLX5_FLOW_ACTION_OF_PUSH_VLAN)
> +				 MLX5_FLOW_ACTION_RAW_ENCAP)
> 
>  #define MLX5_FLOW_DECAP_ACTIONS	(MLX5_FLOW_ACTION_VXLAN_DECAP
> | \
>  				 MLX5_FLOW_ACTION_NVGRE_DECAP | \
> -				 MLX5_FLOW_ACTION_RAW_DECAP | \
> -				 MLX5_FLOW_ACTION_OF_POP_VLAN)
> +				 MLX5_FLOW_ACTION_RAW_DECAP)
> 
>  #define MLX5_FLOW_MODIFY_HDR_ACTIONS
> (MLX5_FLOW_ACTION_SET_IPV4_SRC | \
>  				      MLX5_FLOW_ACTION_SET_IPV4_DST | \
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
@ 2020-01-23  7:56   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:56 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions
> 
> Flow validation function includes, after all items and actions are validated
> discretely, a check for VLAN and VXLAN actions.
> This check is incorrect and redundant.
> 
> This patch removes the invalid check from validation function.
> Check is incorrect, action_flags bit map is checked against items mask
> MLX5_FLOW_LAYER_TUNNEL.
> Check is also redundant, because VLAN push/pop actions can be used
> together with packet reformat actions.
> 
> Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 5a1b426..afa3d0e 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -5060,13 +5060,6 @@ struct field_modify_info modify_tcp[] = {
>  						  "action not supported");
>  		}
>  	}
> -	if ((action_flags & MLX5_FLOW_LAYER_TUNNEL) &&
> -	    (action_flags & MLX5_FLOW_VLAN_ACTIONS))
> -		return rte_flow_error_set(error, ENOTSUP,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> -					  actions,
> -					  "can't have vxlan and vlan"
> -					  " actions in the same rule");
>  	/* Eswitch has few restrictions on using items and actions */
>  	if (attr->transfer) {
>  		if (!mlx5_flow_ext_mreg_supported(dev) &&
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate Dekel Peled
@ 2020-01-23  7:56   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:56 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate
> 
> Validation function of 'push VLAN' action uses (POP_VLAN or PUSH_VLAN)
> actions flags, instead of using a mask of both flags.
> 
> This patch replaces it to use existing VLAN_ACTIONS mask.
> 
> Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index afa3d0e..d7176c8 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1746,8 +1746,7 @@ struct field_modify_info modify_tcp[] = {
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "invalid vlan ethertype");
> -	if (action_flags &
> -		(MLX5_FLOW_ACTION_OF_POP_VLAN |
> MLX5_FLOW_ACTION_OF_PUSH_VLAN))
> +	if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
>  		return rte_flow_error_set(error, ENOTSUP,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "no support for multiple VLAN "
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:57 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value
> 
> Currently the push VLAN action requires a VID value, either from existing
> VLAN item, or from following 'set VLAN vid' action.
> 
> This patch removes this limitation, allowing a push VLAN action with vid value
> 0.
> 
> Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index d7176c8..59ece01 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1734,7 +1734,7 @@ struct field_modify_info modify_tcp[] = {
>   */
>  static int
>  flow_dv_validate_action_push_vlan(uint64_t action_flags,
> -				  uint64_t item_flags,
> +				  uint64_t item_flags __rte_unused,
>  				  const struct rte_flow_action *action,
>  				  const struct rte_flow_attr *attr,
>  				  struct rte_flow_error *error)
> @@ -1751,14 +1751,6 @@ struct field_modify_info modify_tcp[] = {
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "no support for multiple VLAN "
>  					  "actions");
> -	if (!mlx5_flow_find_action
> -			(action + 1,
> RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID) &&
> -	    !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
> -		return rte_flow_error_set(error, ENOTSUP,
> -				RTE_FLOW_ERROR_TYPE_ACTION, action,
> -				"push VLAN needs to match on VLAN in order
> to "
> -				"get VLAN VID information because there is "
> -				"no followed set VLAN VID action");
>  	if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:57 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx
> 
> Add missing check in validation function of 'push VLAN' action.
> Action is not allowed for ingress flow rules.
> 
> Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index b0d5688..1ed677f 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1741,6 +1741,12 @@ struct field_modify_info modify_tcp[] = {  {
>  	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
> 
> +	if (attr->ingress)
> +		return rte_flow_error_set(error, ENOTSUP,
> +
> RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
> +					  NULL,
> +					  "push VLAN action not supported for
> "
> +					  "ingress");
>  	if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) &&
>  	    push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_QINQ))
>  		return rte_flow_error_set(error, EINVAL,
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:57 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx
> 
> Add missing check in validation function of 'pop VLAN' action.
> Action is not allowed for egress flow rules.
> 
> Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 1ed677f..9dc08ce 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1634,6 +1634,12 @@ struct field_modify_info modify_tcp[] = {
> 
> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
>  					  NULL,
>  					  "pop vlan action is not supported");
> +	if (attr->egress)
> +		return rte_flow_error_set(error, ENOTSUP,
> +
> RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
> +					  NULL,
> +					  "pop vlan action not supported for "
> +					  "egress");
>  	/*
>  	 * Check for inconsistencies:
>  	 *  fail strip_vlan in a flow that matches packets without VLAN tags.
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:57 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 08/11] net/mlx5: fix pop VLAN action validation function
> 
> Validation function of 'POP VLAN' action includes check for other 'POP VLAN'
> actions present in flow.
> It doesn't check for 'PUSH VLAN' actions present in flow.
> 
> This patch adds check for 'PUSH VLAN' actions present in flow.
> 
> Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 9dc08ce..de4b765 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1640,17 +1640,10 @@ struct field_modify_info modify_tcp[] = {
>  					  NULL,
>  					  "pop vlan action not supported for "
>  					  "egress");
> -	/*
> -	 * Check for inconsistencies:
> -	 *  fail strip_vlan in a flow that matches packets without VLAN tags.
> -	 *  fail strip_vlan in a flow that matches packets without explicitly a
> -	 *  matching on VLAN tag ?
> -	 */
> -	if (action_flags & MLX5_FLOW_ACTION_OF_POP_VLAN)
> +	if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
>  		return rte_flow_error_set(error, ENOTSUP,
> -
> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> -					  NULL,
> -					  "no support for multiple vlan pop "
> +					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
> +					  "no support for multiple VLAN "
>  					  "actions");
>  	if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
>  		return rte_flow_error_set(error, ENOTSUP,
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation
  2020-01-22 14:27 ` [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
@ 2020-01-23  7:58   ` Slava Ovsiienko
  0 siblings, 0 replies; 16+ messages in thread
From: Slava Ovsiienko @ 2020-01-23  7:58 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad; +Cc: Raslan Darawsheh, Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 16:27
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation
> 
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@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 de4b765..4b6a92c 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1815,10 +1815,10 @@ struct field_modify_info modify_tcp[] = {
>   *
>   * @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.
>   *
> @@ -1838,33 +1838,17 @@ struct field_modify_info modify_tcp[] = {
>  		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,
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-01-23  7:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1579703134.git.dekelp@mellanox.com>
2020-01-22 14:27 ` [dpdk-stable] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
2020-01-23  7:56   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
2020-01-23  7:56   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate Dekel Peled
2020-01-23  7:56   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value Dekel Peled
2020-01-23  7:57   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx Dekel Peled
2020-01-23  7:57   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx Dekel Peled
2020-01-23  7:57   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
2020-01-23  7:57   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-stable] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
2020-01-23  7:58   ` Slava Ovsiienko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).