DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action
@ 2019-08-15  9:26 Dekel Peled
  2019-09-04 14:10 ` Slava Ovsiienko
  2019-09-05  8:59 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Dekel Peled @ 2019-08-15  9:26 UTC (permalink / raw)
  To: yskoh, viacheslavo, shahafs; +Cc: orika, dev, stable

Function mlx5_flow_validate_action_drop() checks if another fate
action is already present in this flow rule, using
defined value MLX5_FLOW_FATE_ACTIONS.
This patch enhances the check using value
(MLX5_FLOW_FATE_ACTIONS | MLX5_FLOW_FATE_ESWITCH_ACTIONS)
to make sure all relevant fate actions are checked.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 9d2c8c9..2356c14 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -809,7 +809,8 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 		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)
+	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"
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action
  2019-08-15  9:26 [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action Dekel Peled
@ 2019-09-04 14:10 ` Slava Ovsiienko
  2019-09-05  8:59 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Slava Ovsiienko @ 2019-09-04 14:10 UTC (permalink / raw)
  To: Dekel Peled, Raslan Darawsheh; +Cc: Ori Kam, dev, stable

> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Thursday, August 15, 2019 12:27
> To: Yongseok Koh <yskoh@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix validation of drop action
> 
> Function mlx5_flow_validate_action_drop() checks if another fate action is
> already present in this flow rule, using defined value
> MLX5_FLOW_FATE_ACTIONS.
> This patch enhances the check using value (MLX5_FLOW_FATE_ACTIONS |
> MLX5_FLOW_FATE_ESWITCH_ACTIONS) to make sure all relevant fate
> actions are checked.
> 
> Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 9d2c8c9..2356c14 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -809,7 +809,8 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  		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)
> +	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"
> --
> 1.8.3.1


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action
  2019-08-15  9:26 [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action Dekel Peled
  2019-09-04 14:10 ` Slava Ovsiienko
@ 2019-09-05  8:59 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-09-05  8:59 UTC (permalink / raw)
  To: Dekel Peled, Yongseok Koh, Slava Ovsiienko, Shahaf Shuler
  Cc: Ori Kam, dev, stable

Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Thursday, August 15, 2019 12:27 PM
> To: Yongseok Koh <yskoh@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action
> 
> Function mlx5_flow_validate_action_drop() checks if another fate action is
> already present in this flow rule, using defined value
> MLX5_FLOW_FATE_ACTIONS.
> This patch enhances the check using value (MLX5_FLOW_FATE_ACTIONS |
> MLX5_FLOW_FATE_ESWITCH_ACTIONS) to make sure all relevant fate
> actions are checked.
> 
> Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15  9:26 [dpdk-dev] [PATCH] net/mlx5: fix validation of drop action Dekel Peled
2019-09-04 14:10 ` Slava Ovsiienko
2019-09-05  8:59 ` Raslan Darawsheh

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox