]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix RoCE setting at HCA level
authorShay Drory <shayd@nvidia.com>
Wed, 9 Nov 2022 12:42:59 +0000 (14:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:02:11 +0000 (12:02 +0100)
commit6437ee0c37f448dadc04cc20c840f811caef23c0
tree66299ecea6126acd1c23f2e109d708ac23c1d4ea
parentb3fffb04dc444f62378b76ba17575c95ee1d5f07
net/mlx5: Fix RoCE setting at HCA level

[ Upstream commit c4ad5f2bdad56265b23d3635494ecdb205431807 ]

mlx5 PF can disable RoCE for its VFs and SFs. In such case RoCE is
marked as unsupported on those VFs/SFs.
The cited patch added an option for disable (and enable) RoCE at HCA
level. However, that commit didn't check whether RoCE is supported on
the HCA and enabled user to try and set RoCE to on.
Fix it by checking whether the HCA supports RoCE.

Fixes: c56d8cf0c47c ("net/mlx5: Disable roce at HCA level")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/main.c