]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: fix assert in modify converting
authorBing Zhao <bingz@mellanox.com>
Wed, 29 Apr 2020 13:06:14 +0000 (21:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:27 +0000 (15:54 +0200)
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 driver
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

index c8035b352ec9a4a21bc250a92e5332de6ace6cd9..794afcf18c66192ff5daa7fbecf42c652f452494 100644 (file)
@@ -435,7 +435,6 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
                /* 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;