Commit 2610a3d6 authored by Shay Drory's avatar Shay Drory Committed by Jakub Kicinski
Browse files

net/mlx5: fs, Fix inverted cap check in tx flow table root disconnect



The capability check for reset_root_to_default was inverted, causing
the function to return -EOPNOTSUPP when the capability IS supported,
rather than when it is NOT supported.

Fix the capability check condition.

Fixes: 3c9c34c3 ("net/mlx5: fs, Command to control TX flow table root")
Signed-off-by: default avatarShay Drory <shayd@nvidia.com>
Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1769503961-124173-2-git-send-email-tariqt@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2aa1545b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1198,7 +1198,8 @@ int mlx5_fs_cmd_set_tx_flow_table_root(struct mlx5_core_dev *dev, u32 ft_id, boo
	u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {};
	u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)] = {};

	if (disconnect && MLX5_CAP_FLOWTABLE_NIC_TX(dev, reset_root_to_default))
	if (disconnect &&
	    !MLX5_CAP_FLOWTABLE_NIC_TX(dev, reset_root_to_default))
		return -EOPNOTSUPP;

	MLX5_SET(set_flow_table_root_in, in, opcode,