[dpdk-stable] [PATCH 1/2] net/mlx5: fix the E-Switch sample action creation failure

Jiawei Wang jiaweiw at nvidia.com
Tue Jan 26 13:48:17 CET 2021


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 at dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1a0c0be..27d711d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9155,7 +9155,7 @@ struct mlx5_cache_entry *
 	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,
-- 
1.8.3.1



More information about the stable mailing list