From: Jiawei Wang Date: Tue, 26 Jan 2021 12:53:32 +0000 (+0200) Subject: net/mlx5: fix E-Switch sample action creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ce0f14c651490fd2a8b2c07a0e4a3a4bc96692e5;p=dpdk.git net/mlx5: fix E-Switch sample action creation This patch fixes the incorrect checking for the return value of default miss action creation. Fixes: 14020ad53d4e ("net/mlx5: wrap default miss flow action per OS") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 9ffd6ec1a8..8a948fca64 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9155,7 +9155,7 @@ flow_dv_sample_create_cb(struct mlx5_cache_list *list __rte_unused, if (resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB) { ret = mlx5_flow_os_create_flow_action_default_miss (&cache_resource->default_miss); - if (!ret) { + if (ret) { rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,