[02/11] net/mlx5: fix invalid check for VLAN actions
diff mbox series

Message ID 7ad0543b9d423640c5213606184237f57fb17b70.1579703134.git.dekelp@mellanox.com
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers show
Series
  • net/mlx5: vlan actions validation fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Dekel Peled Jan. 22, 2020, 2:27 p.m. UTC
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(-)

Comments

Viacheslav Ovsiienko Jan. 23, 2020, 7:56 a.m. UTC | #1
> -----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

Patch
diff mbox series

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