DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes
@ 2020-01-22 14:27 Dekel Peled
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev

This series includes several patches, fixing different faults in
validation functions of VLAN actions.

Series-acked-by: Ori Kam <orika@mellanox.com>

Dekel Peled (11):
  net/mlx5: fix masks of encap and decap actions
  net/mlx5: fix invalid check for VLAN actions
  net/mlx5: fix bit mask used for push VLAN validate
  net/mlx5: fix allow push VLAN without VID value
  net/mlx5: unify validation of drop action
  net/mlx5: fix block push VLAN action on Rx
  net/mlx5: fix block pop VLAN action on Tx
  net/mlx5: fix pop VLAN action validation function
  net/mlx5: fix the set VLAN VID action validation
  net/mlx5: update description of validation funcs
  doc: update MLX5 supported hardware offloads table

 doc/guides/nics/mlx5.rst           |   8 +--
 drivers/net/mlx5/mlx5_flow.c       |  25 +------
 drivers/net/mlx5/mlx5_flow.h       |   6 +-
 drivers/net/mlx5/mlx5_flow_dv.c    | 139 +++++++++++++------------------------
 drivers/net/mlx5/mlx5_flow_verbs.c |  12 ++++
 5 files changed, 65 insertions(+), 125 deletions(-)

-- 
1.8.3.1


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

* [dpdk-dev] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:56   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate Dekel Peled
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions Dekel Peled
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value Dekel Peled
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (2 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 05/11] net/mlx5: unify validation of drop action Dekel Peled
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 05/11] net/mlx5: unify validation of drop action
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (3 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx Dekel Peled
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev

According to PRM: "Drop action is mutually-exclusive with any other
action, except for Count action".
In current code this limitaion is checked separately in validation
function of each action.

This patch removes the discrete checks, and adds a single check common
for all actions.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c       | 25 +------------------------
 drivers/net/mlx5/mlx5_flow_dv.c    | 36 ++++++++++++------------------------
 drivers/net/mlx5/mlx5_flow_verbs.c | 12 ++++++++++++
 3 files changed, 25 insertions(+), 48 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 970123b..7738cb2 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -905,11 +905,6 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 			       const struct rte_flow_attr *attr,
 			       struct rte_flow_error *error)
 {
-
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and flag in same flow");
 	if (action_flags & MLX5_FLOW_ACTION_MARK)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -961,10 +956,6 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 					  &mark->id,
 					  "mark id must in 0 <= id < "
 					  RTE_STR(MLX5_FLOW_MARK_MAX));
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and mark in same flow");
 	if (action_flags & MLX5_FLOW_ACTION_FLAG)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -996,24 +987,10 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_flow_validate_action_drop(uint64_t action_flags,
+mlx5_flow_validate_action_drop(uint64_t action_flags __rte_unused,
 			       const struct rte_flow_attr *attr,
 			       struct rte_flow_error *error)
 {
-	if (action_flags & MLX5_FLOW_ACTION_FLAG)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and flag in same flow");
-	if (action_flags & MLX5_FLOW_ACTION_MARK)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and mark in same flow");
-	if (action_flags & (MLX5_FLOW_FATE_ACTIONS |
-			    MLX5_FLOW_FATE_ESWITCH_ACTIONS))
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't have 2 fate actions in"
-					  " same flow");
 	if (attr->egress)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 59ece01..b0d5688 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1912,10 +1912,6 @@ struct field_modify_info modify_tcp[] = {
 	if (ret < 0)
 		return ret;
 	assert(ret > 0);
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and flag in same flow");
 	if (action_flags & MLX5_FLOW_ACTION_MARK)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -1985,10 +1981,6 @@ struct field_modify_info modify_tcp[] = {
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  &mark->id,
 					  "mark id exceeds the limit");
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and mark in same flow");
 	if (action_flags & MLX5_FLOW_ACTION_FLAG)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -2173,10 +2165,6 @@ struct field_modify_info modify_tcp[] = {
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "configuration cannot be null");
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and encap in same flow");
 	if (action_flags & (MLX5_FLOW_ENCAP_ACTIONS | MLX5_FLOW_DECAP_ACTIONS))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -2209,10 +2197,6 @@ struct field_modify_info modify_tcp[] = {
 				 const struct rte_flow_attr *attr,
 				 struct rte_flow_error *error)
 {
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and decap in same flow");
 	if (action_flags & (MLX5_FLOW_ENCAP_ACTIONS | MLX5_FLOW_DECAP_ACTIONS))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -2259,10 +2243,6 @@ struct field_modify_info modify_tcp[] = {
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "configuration cannot be null");
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and encap in same flow");
 	if (action_flags & MLX5_FLOW_ENCAP_ACTIONS)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -2306,10 +2286,6 @@ struct field_modify_info modify_tcp[] = {
 {
 	const struct rte_flow_action_raw_decap *decap	= action->conf;
 
-	if (action_flags & MLX5_FLOW_ACTION_DROP)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "can't drop and decap in same flow");
 	if (action_flags & MLX5_FLOW_ENCAP_ACTIONS)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -5051,6 +5027,18 @@ struct field_modify_info modify_tcp[] = {
 						  "action not supported");
 		}
 	}
+	/*
+	 * Validate the drop action mutual exclusion with other actions.
+	 * Drop action is mutually-exclusive with any other action, except for
+	 * Count action.
+	 */
+	if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
+	    (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT)))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "Drop action is mutually-exclusive "
+					  "with any other action, except for "
+					  "Count action");
 	/* Eswitch has few restrictions on using items and actions */
 	if (attr->transfer) {
 		if (!mlx5_flow_ext_mreg_supported(dev) &&
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index c787c98..72fb1e4 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1255,6 +1255,18 @@
 						  "action not supported");
 		}
 	}
+	/*
+	 * Validate the drop action mutual exclusion with other actions.
+	 * Drop action is mutually-exclusive with any other action, except for
+	 * Count action.
+	 */
+	if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
+	    (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT)))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "Drop action is mutually-exclusive "
+					  "with any other action, except for "
+					  "Count action");
 	if (!(action_flags & MLX5_FLOW_FATE_ACTIONS))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, actions,
-- 
1.8.3.1


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

* [dpdk-dev] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (4 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 05/11] net/mlx5: unify validation of drop action Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:57   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx Dekel Peled
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (5 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (6 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [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-dev] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (7 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [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
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs Dekel Peled
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 24+ 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] 24+ messages in thread

* [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (8 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:58   ` Slava Ovsiienko
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table Dekel Peled
  2020-01-26 15:48 ` [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Raslan Darawsheh
  11 siblings, 1 reply; 24+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev

Description of several functions is not accurate.
This patch updates the description, parameter names etc.

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 4b6a92c..059d03f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1662,14 +1662,10 @@ struct field_modify_info modify_tcp[] = {
 /**
  * Get VLAN default info from vlan match info.
  *
- * @param[in] dev
- *   Pointer to the rte_eth_dev structure.
- * @param[in] item
+ * @param[in] items
  *   the list of item specifications.
  * @param[out] vlan
  *   pointer VLAN info to fill to.
- * @param[out] error
- *   Pointer to error structure.
  *
  * @return
  *   0 on success, a negative errno value otherwise and rte_errno is set.
@@ -1721,8 +1717,10 @@ struct field_modify_info modify_tcp[] = {
  *
  * @param[in] action_flags
  *   Holds the actions detected until now.
+ * @param[in] item_flags
+ *   The items found in this flow rule.
  * @param[in] action
- *   Pointer to the encap action.
+ *   Pointer to the action structure.
  * @param[in] attr
  *   Pointer to flow attributes
  * @param[out] error
@@ -1772,8 +1770,6 @@ struct field_modify_info modify_tcp[] = {
  *   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.
  *
@@ -1988,7 +1984,7 @@ struct field_modify_info modify_tcp[] = {
  * @param[in] dev
  *   Pointer to the rte_eth_dev structure.
  * @param[in] action
- *   Pointer to the encap action.
+ *   Pointer to the action structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] attr
@@ -2049,7 +2045,7 @@ struct field_modify_info modify_tcp[] = {
  * @param[in] dev
  *   Pointer to the rte_eth_dev structure.
  * @param[in] action
- *   Pointer to the encap action.
+ *   Pointer to the action structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] attr
@@ -2103,7 +2099,7 @@ struct field_modify_info modify_tcp[] = {
  * Validate count action.
  *
  * @param[in] dev
- *   device otr.
+ *   Pointer to rte_eth_dev structure.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -2135,7 +2131,7 @@ struct field_modify_info modify_tcp[] = {
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] action
- *   Pointer to the encap action.
+ *   Pointer to the action structure.
  * @param[in] attr
  *   Pointer to flow attributes
  * @param[out] error
@@ -2995,12 +2991,12 @@ struct field_modify_info modify_tcp[] = {
  *
  * @param[in] dev
  *   Pointer to rte_eth_dev structure.
- * @param[in] vlan_tag
- *   the vlan tag to push to the Ethernet header.
- * @param[in, out] dev_flow
- *   Pointer to the mlx5_flow.
  * @param[in] attr
  *   Pointer to the flow attributes.
+ * @param[in] vlan
+ *   Pointer to the vlan to push to the Ethernet header.
+ * @param[in, out] dev_flow
+ *   Pointer to the mlx5_flow.
  * @param[out] error
  *   Pointer to the error structure.
  *
-- 
1.8.3.1


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

* [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (9 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs Dekel Peled
@ 2020-01-22 14:27 ` Dekel Peled
  2020-01-23  7:58   ` Slava Ovsiienko
  2020-01-26 15:48 ` [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Raslan Darawsheh
  11 siblings, 1 reply; 24+ messages in thread
From: Dekel Peled @ 2020-01-22 14:27 UTC (permalink / raw)
  To: matan, viacheslavo; +Cc: rasland, orika, dev

Function of_set_vlan_vid is wrongly listed twice in table
"Supported hardware offloads".

This patch removes the listing of of_set_vlan_vid under
"Header rewrite", and leaves the listing of of_set_vlan_vid
under "VLAN".

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 doc/guides/nics/mlx5.rst | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 66997f1..2411fb3 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1165,10 +1165,6 @@ Supported hardware offloads
    | | set_ttl /           | |               | |               |
    | | set_mac_src /       | |               | |               |
    | | set_mac_dst)        | |               | |               |
-   | |                     | |               | |               |
-   | | (of_set_vlan_vid)   | | DPDK 19.11    | | DPDK 19.11    |
-   |                       | | OFED 4.7-1    | | OFED 4.7-1    |
-   |                       | | ConnectX-5    | | ConnectX-5    |
    +-----------------------+-----------------+-----------------+
    | Jump                  | | DPDK 19.05    | | DPDK 19.02    |
    |                       | | OFED 4.7-1    | | OFED 4.7-1    |
@@ -1188,8 +1184,8 @@ Supported hardware offloads
    | | VLAN                | | DPDK 19.11    | | DPDK 19.11    |
    | | (of_pop_vlan /      | | OFED 4.7-1    | | OFED 4.7-1    |
    | | of_push_vlan /      | | ConnectX-5    | | ConnectX-5    |
-   | | of_set_vlan_pcp /   |                 |                 |
-   | | of_set_vlan_vid)    |                 |                 |
+   | | of_set_vlan_pcp /   | |               | |               |
+   | | of_set_vlan_vid)    | |               | |               |
    +-----------------------+-----------------+-----------------+
    | Hairpin               | |               | | DPDK 19.11    |
    |                       | |     N/A       | | OFED 4.7-3    |
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH 01/11] net/mlx5: fix masks of encap and decap actions
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 02/11] net/mlx5: fix invalid check for VLAN actions Dekel Peled
@ 2020-01-23  7:56   ` Slava Ovsiienko
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 03/11] net/mlx5: fix bit mask used for push VLAN validate
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 04/11] net/mlx5: fix allow push VLAN without VID value
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 05/11] net/mlx5: unify validation of drop action
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 05/11] net/mlx5: unify validation of drop action Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 24+ 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

> -----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
> Subject: [PATCH 05/11] net/mlx5: unify validation of drop action
> 
> According to PRM: "Drop action is mutually-exclusive with any other action,
> except for Count action".
> In current code this limitaion is checked separately in validation function of
> each action.
> 
> This patch removes the discrete checks, and adds a single check common for
> all actions.
> 
> 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.c       | 25 +------------------------
>  drivers/net/mlx5/mlx5_flow_dv.c    | 36 ++++++++++++------------------------
>  drivers/net/mlx5/mlx5_flow_verbs.c | 12 ++++++++++++
>  3 files changed, 25 insertions(+), 48 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 970123b..7738cb2 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -905,11 +905,6 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  			       const struct rte_flow_attr *attr,
>  			       struct rte_flow_error *error)  {
> -
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and flag in same flow");
>  	if (action_flags & MLX5_FLOW_ACTION_MARK)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -961,10 +956,6 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  					  &mark->id,
>  					  "mark id must in 0 <= id < "
>  					  RTE_STR(MLX5_FLOW_MARK_MAX));
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and mark in same flow");
>  	if (action_flags & MLX5_FLOW_ACTION_FLAG)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -996,24 +987,10 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>   *   0 on success, a negative errno value otherwise and rte_errno is set.
>   */
>  int
> -mlx5_flow_validate_action_drop(uint64_t action_flags,
> +mlx5_flow_validate_action_drop(uint64_t action_flags __rte_unused,
>  			       const struct rte_flow_attr *attr,
>  			       struct rte_flow_error *error)  {
> -	if (action_flags & MLX5_FLOW_ACTION_FLAG)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and flag in same flow");
> -	if (action_flags & MLX5_FLOW_ACTION_MARK)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and mark in same flow");
> -	if (action_flags & (MLX5_FLOW_FATE_ACTIONS |
> -			    MLX5_FLOW_FATE_ESWITCH_ACTIONS))
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't have 2 fate actions in"
> -					  " same flow");
>  	if (attr->egress)
>  		return rte_flow_error_set(error, ENOTSUP,
> 
> RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL, diff --git
> a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index
> 59ece01..b0d5688 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1912,10 +1912,6 @@ struct field_modify_info modify_tcp[] = {
>  	if (ret < 0)
>  		return ret;
>  	assert(ret > 0);
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and flag in same flow");
>  	if (action_flags & MLX5_FLOW_ACTION_MARK)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -1985,10 +1981,6 @@ struct field_modify_info modify_tcp[] = {
> 
> RTE_FLOW_ERROR_TYPE_ACTION_CONF,
>  					  &mark->id,
>  					  "mark id exceeds the limit");
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and mark in same flow");
>  	if (action_flags & MLX5_FLOW_ACTION_FLAG)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -2173,10 +2165,6 @@ struct field_modify_info modify_tcp[] = {
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "configuration cannot be null");
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and encap in same
> flow");
>  	if (action_flags & (MLX5_FLOW_ENCAP_ACTIONS |
> MLX5_FLOW_DECAP_ACTIONS))
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -2209,10 +2197,6 @@ struct field_modify_info modify_tcp[] = {
>  				 const struct rte_flow_attr *attr,
>  				 struct rte_flow_error *error)
>  {
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and decap in same
> flow");
>  	if (action_flags & (MLX5_FLOW_ENCAP_ACTIONS |
> MLX5_FLOW_DECAP_ACTIONS))
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -2259,10 +2243,6 @@ struct field_modify_info modify_tcp[] = {
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "configuration cannot be null");
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and encap in same
> flow");
>  	if (action_flags & MLX5_FLOW_ENCAP_ACTIONS)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -2306,10 +2286,6 @@ struct field_modify_info modify_tcp[] = {  {
>  	const struct rte_flow_action_raw_decap *decap	= action-
> >conf;
> 
> -	if (action_flags & MLX5_FLOW_ACTION_DROP)
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> -					  "can't drop and decap in same
> flow");
>  	if (action_flags & MLX5_FLOW_ENCAP_ACTIONS)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL, @@ -5051,6 +5027,18 @@ struct field_modify_info modify_tcp[] = {
>  						  "action not supported");
>  		}
>  	}
> +	/*
> +	 * Validate the drop action mutual exclusion with other actions.
> +	 * Drop action is mutually-exclusive with any other action, except for
> +	 * Count action.
> +	 */
> +	if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
> +	    (action_flags & ~(MLX5_FLOW_ACTION_DROP |
> MLX5_FLOW_ACTION_COUNT)))
> +		return rte_flow_error_set(error, EINVAL,
> +					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> +					  "Drop action is mutually-exclusive "
> +					  "with any other action, except for "
> +					  "Count action");
>  	/* Eswitch has few restrictions on using items and actions */
>  	if (attr->transfer) {
>  		if (!mlx5_flow_ext_mreg_supported(dev) && diff --git
> a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
> index c787c98..72fb1e4 100644
> --- a/drivers/net/mlx5/mlx5_flow_verbs.c
> +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
> @@ -1255,6 +1255,18 @@
>  						  "action not supported");
>  		}
>  	}
> +	/*
> +	 * Validate the drop action mutual exclusion with other actions.
> +	 * Drop action is mutually-exclusive with any other action, except for
> +	 * Count action.
> +	 */
> +	if ((action_flags & MLX5_FLOW_ACTION_DROP) &&
> +	    (action_flags & ~(MLX5_FLOW_ACTION_DROP |
> MLX5_FLOW_ACTION_COUNT)))
> +		return rte_flow_error_set(error, EINVAL,
> +					  RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> +					  "Drop action is mutually-exclusive "
> +					  "with any other action, except for "
> +					  "Count action");
>  	if (!(action_flags & MLX5_FLOW_FATE_ACTIONS))
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> actions,
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [PATCH 06/11] net/mlx5: fix block push VLAN action on Rx
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 07/11] net/mlx5: fix block pop VLAN action on Tx
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function Dekel Peled
@ 2020-01-23  7:57   ` Slava Ovsiienko
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation
  2020-01-22 14:27 ` [dpdk-dev] [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; 24+ 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] 24+ messages in thread

* Re: [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs Dekel Peled
@ 2020-01-23  7:58   ` Slava Ovsiienko
  0 siblings, 0 replies; 24+ 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

> -----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
> Subject: [PATCH 10/11] net/mlx5: update description of validation funcs
> 
> Description of several functions is not accurate.
> This patch updates the description, parameter names etc.
> 
> 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 | 28 ++++++++++++----------------
>  1 file changed, 12 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 4b6a92c..059d03f 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1662,14 +1662,10 @@ struct field_modify_info modify_tcp[] = {
>  /**
>   * Get VLAN default info from vlan match info.
>   *
> - * @param[in] dev
> - *   Pointer to the rte_eth_dev structure.
> - * @param[in] item
> + * @param[in] items
>   *   the list of item specifications.
>   * @param[out] vlan
>   *   pointer VLAN info to fill to.
> - * @param[out] error
> - *   Pointer to error structure.
>   *
>   * @return
>   *   0 on success, a negative errno value otherwise and rte_errno is set.
> @@ -1721,8 +1717,10 @@ struct field_modify_info modify_tcp[] = {
>   *
>   * @param[in] action_flags
>   *   Holds the actions detected until now.
> + * @param[in] item_flags
> + *   The items found in this flow rule.
>   * @param[in] action
> - *   Pointer to the encap action.
> + *   Pointer to the action structure.
>   * @param[in] attr
>   *   Pointer to flow attributes
>   * @param[out] error
> @@ -1772,8 +1770,6 @@ struct field_modify_info modify_tcp[] = {
>   *   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.
>   *
> @@ -1988,7 +1984,7 @@ struct field_modify_info modify_tcp[] = {
>   * @param[in] dev
>   *   Pointer to the rte_eth_dev structure.
>   * @param[in] action
> - *   Pointer to the encap action.
> + *   Pointer to the action structure.
>   * @param[in] action_flags
>   *   Holds the actions detected until now.
>   * @param[in] attr
> @@ -2049,7 +2045,7 @@ struct field_modify_info modify_tcp[] = {
>   * @param[in] dev
>   *   Pointer to the rte_eth_dev structure.
>   * @param[in] action
> - *   Pointer to the encap action.
> + *   Pointer to the action structure.
>   * @param[in] action_flags
>   *   Holds the actions detected until now.
>   * @param[in] attr
> @@ -2103,7 +2099,7 @@ struct field_modify_info modify_tcp[] = {
>   * Validate count action.
>   *
>   * @param[in] dev
> - *   device otr.
> + *   Pointer to rte_eth_dev structure.
>   * @param[out] error
>   *   Pointer to error structure.
>   *
> @@ -2135,7 +2131,7 @@ struct field_modify_info modify_tcp[] = {
>   * @param[in] action_flags
>   *   Holds the actions detected until now.
>   * @param[in] action
> - *   Pointer to the encap action.
> + *   Pointer to the action structure.
>   * @param[in] attr
>   *   Pointer to flow attributes
>   * @param[out] error
> @@ -2995,12 +2991,12 @@ struct field_modify_info modify_tcp[] = {
>   *
>   * @param[in] dev
>   *   Pointer to rte_eth_dev structure.
> - * @param[in] vlan_tag
> - *   the vlan tag to push to the Ethernet header.
> - * @param[in, out] dev_flow
> - *   Pointer to the mlx5_flow.
>   * @param[in] attr
>   *   Pointer to the flow attributes.
> + * @param[in] vlan
> + *   Pointer to the vlan to push to the Ethernet header.
> + * @param[in, out] dev_flow
> + *   Pointer to the mlx5_flow.
>   * @param[out] error
>   *   Pointer to the error structure.
>   *
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table Dekel Peled
@ 2020-01-23  7:58   ` Slava Ovsiienko
  0 siblings, 0 replies; 24+ 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

> -----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
> Subject: [PATCH 11/11] doc: update MLX5 supported hardware offloads table
> 
> Function of_set_vlan_vid is wrongly listed twice in table "Supported hardware
> offloads".
> 
> This patch removes the listing of of_set_vlan_vid under "Header rewrite", and
> leaves the listing of of_set_vlan_vid under "VLAN".
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  doc/guides/nics/mlx5.rst | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index
> 66997f1..2411fb3 100644
> --- a/doc/guides/nics/mlx5.rst
> +++ b/doc/guides/nics/mlx5.rst
> @@ -1165,10 +1165,6 @@ Supported hardware offloads
>     | | set_ttl /           | |               | |               |
>     | | set_mac_src /       | |               | |               |
>     | | set_mac_dst)        | |               | |               |
> -   | |                     | |               | |               |
> -   | | (of_set_vlan_vid)   | | DPDK 19.11    | | DPDK 19.11    |
> -   |                       | | OFED 4.7-1    | | OFED 4.7-1    |
> -   |                       | | ConnectX-5    | | ConnectX-5    |
>     +-----------------------+-----------------+-----------------+
>     | Jump                  | | DPDK 19.05    | | DPDK 19.02    |
>     |                       | | OFED 4.7-1    | | OFED 4.7-1    |
> @@ -1188,8 +1184,8 @@ Supported hardware offloads
>     | | VLAN                | | DPDK 19.11    | | DPDK 19.11    |
>     | | (of_pop_vlan /      | | OFED 4.7-1    | | OFED 4.7-1    |
>     | | of_push_vlan /      | | ConnectX-5    | | ConnectX-5    |
> -   | | of_set_vlan_pcp /   |                 |                 |
> -   | | of_set_vlan_vid)    |                 |                 |
> +   | | of_set_vlan_pcp /   | |               | |               |
> +   | | of_set_vlan_vid)    | |               | |               |
>     +-----------------------+-----------------+-----------------+
>     | Hairpin               | |               | | DPDK 19.11    |
>     |                       | |     N/A       | | OFED 4.7-3    |
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes
  2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
                   ` (10 preceding siblings ...)
  2020-01-22 14:27 ` [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table Dekel Peled
@ 2020-01-26 15:48 ` Raslan Darawsheh
  11 siblings, 0 replies; 24+ messages in thread
From: Raslan Darawsheh @ 2020-01-26 15:48 UTC (permalink / raw)
  To: Dekel Peled, Matan Azrad, Slava Ovsiienko; +Cc: Ori Kam, dev

Hi,

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 4:27 PM
> 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
> Subject: [PATCH 00/11] net/mlx5: vlan actions validation fixes
> 
> This series includes several patches, fixing different faults in validation
> functions of VLAN actions.
> 
> Series-acked-by: Ori Kam <orika@mellanox.com>
> 
> Dekel Peled (11):
>   net/mlx5: fix masks of encap and decap actions
>   net/mlx5: fix invalid check for VLAN actions
>   net/mlx5: fix bit mask used for push VLAN validate
>   net/mlx5: fix allow push VLAN without VID value
>   net/mlx5: unify validation of drop action
>   net/mlx5: fix block push VLAN action on Rx
>   net/mlx5: fix block pop VLAN action on Tx
>   net/mlx5: fix pop VLAN action validation function
>   net/mlx5: fix the set VLAN VID action validation
>   net/mlx5: update description of validation funcs
>   doc: update MLX5 supported hardware offloads table
> 
>  doc/guides/nics/mlx5.rst           |   8 +--
>  drivers/net/mlx5/mlx5_flow.c       |  25 +------
>  drivers/net/mlx5/mlx5_flow.h       |   6 +-
>  drivers/net/mlx5/mlx5_flow_dv.c    | 139 +++++++++++++----------------------
> --
>  drivers/net/mlx5/mlx5_flow_verbs.c |  12 ++++
>  5 files changed, 65 insertions(+), 125 deletions(-)
> 
> --
> 1.8.3.1


Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2020-01-26 15:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 14:27 [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Dekel Peled
2020-01-22 14:27 ` [dpdk-dev] [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-dev] [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-dev] [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-dev] [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-dev] [PATCH 05/11] net/mlx5: unify validation of drop action Dekel Peled
2020-01-23  7:57   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-dev] [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-dev] [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-dev] [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-dev] [PATCH 09/11] net/mlx5: fix the set VLAN VID action validation Dekel Peled
2020-01-23  7:58   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-dev] [PATCH 10/11] net/mlx5: update description of validation funcs Dekel Peled
2020-01-23  7:58   ` Slava Ovsiienko
2020-01-22 14:27 ` [dpdk-dev] [PATCH 11/11] doc: update MLX5 supported hardware offloads table Dekel Peled
2020-01-23  7:58   ` Slava Ovsiienko
2020-01-26 15:48 ` [dpdk-dev] [PATCH 00/11] net/mlx5: vlan actions validation fixes Raslan Darawsheh

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).