DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix validate set meta action for zero value
@ 2020-03-12  9:24 Wisam Jaddo
  2020-03-15 11:29 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Wisam Jaddo @ 2020-03-12  9:24 UTC (permalink / raw)
  To: dev, rasland, matan; +Cc: viacheslavo, stable

There is no reason to prevent the user from using zero metadata,
it indeed means no metadata, but sometimes the user may need to
report to datapath that there is no metadata anymore, which is
valid case.

Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")
Cc: viacheslavo@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e7278f0..e2d6690 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2109,10 +2109,6 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "meta data must be within reg C0");
-	if (!(conf->data & conf->mask))
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-					  "zero value has no effect");
 	return 0;
 }
 
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix validate set meta action for zero value
  2020-03-12  9:24 [dpdk-dev] [PATCH] net/mlx5: fix validate set meta action for zero value Wisam Jaddo
@ 2020-03-15 11:29 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-03-15 11:29 UTC (permalink / raw)
  To: Wisam Monther, dev, Matan Azrad; +Cc: Slava Ovsiienko, stable

Hi,

> -----Original Message-----
> From: Wisam Monther <wisamm@mellanox.com>
> Sent: Thursday, March 12, 2020 11:25 AM
> To: dev@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Matan
> Azrad <matan@mellanox.com>
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix validate set meta action for zero value
> 
> There is no reason to prevent the user from using zero metadata,
> it indeed means no metadata, but sometimes the user may need to
> report to datapath that there is no metadata anymore, which is
> valid case.
> 
> Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")
> Cc: viacheslavo@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index e7278f0..e2d6690 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -2109,10 +2109,6 @@ flow_dv_validate_action_set_meta(struct
> rte_eth_dev *dev,
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "meta data must be within reg C0");
> -	if (!(conf->data & conf->mask))
> -		return rte_flow_error_set(error, EINVAL,
> -					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
> -					  "zero value has no effect");
>  	return 0;
>  }
> 
> --
> 2.7.4


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2020-03-15 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  9:24 [dpdk-dev] [PATCH] net/mlx5: fix validate set meta action for zero value Wisam Jaddo
2020-03-15 11:29 ` 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).