DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix wrong assert in modify converting
@ 2020-04-29 13:06 Bing Zhao
  2020-05-04  7:20 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Bing Zhao @ 2020-04-29 13:06 UTC (permalink / raw)
  To: viacheslavo, rasland; +Cc: orika, matan, dev, stable

The assertion was added incorrectly in converting the modify actions
into the format of low layer driver.
There is no mask specified in the rte_flow actions, and PMD dirver
will give a mask of all 1s to the field to be modified. For each
field, the mask could not be zero. But for the whole header which
contains this field, the masks of other fields could be zero. The
assertion needs to be removed for debug mode.

Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
Cc: stable@dpdk.org

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6263ecc..8cd9c83 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -434,7 +434,6 @@ struct field_modify_info modify_tcp[] = {
 		/* Fetch variable byte size mask from the array. */
 		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
 					   field->offset, field->size);
-		MLX5_ASSERT(mask);
 		if (!mask) {
 			++field;
 			continue;
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix wrong assert in modify converting
  2020-04-29 13:06 [dpdk-dev] [PATCH] net/mlx5: fix wrong assert in modify converting Bing Zhao
@ 2020-05-04  7:20 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-05-04  7:20 UTC (permalink / raw)
  To: Bing Zhao, Slava Ovsiienko; +Cc: Ori Kam, Matan Azrad, dev, stable

Hi,
> -----Original Message-----
> From: Bing Zhao <bingz@mellanox.com>
> Sent: Wednesday, April 29, 2020 4:06 PM
> To: Slava Ovsiienko <viacheslavo@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; Matan Azrad <matan@mellanox.com>;
> dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix wrong assert in modify converting
> 
> The assertion was added incorrectly in converting the modify actions
> into the format of low layer driver.
> There is no mask specified in the rte_flow actions, and PMD dirver
> will give a mask of all 1s to the field to be modified. For each
> field, the mask could not be zero. But for the whole header which
> contains this field, the masks of other fields could be zero. The
> assertion needs to be removed for debug mode.
> 
> Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bing Zhao <bingz@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 6263ecc..8cd9c83 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -434,7 +434,6 @@ struct field_modify_info modify_tcp[] = {
>  		/* Fetch variable byte size mask from the array. */
>  		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
>  					   field->offset, field->size);
> -		MLX5_ASSERT(mask);
>  		if (!mask) {
>  			++field;
>  			continue;
> --
> 1.8.3.1


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-05-04  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 13:06 [dpdk-dev] [PATCH] net/mlx5: fix wrong assert in modify converting Bing Zhao
2020-05-04  7:20 ` 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).