Skip to content

Commit 5decdc8

Browse files
shayshyigregkh
authored andcommitted
net/mlx5: Disallow RoCE on lag device
[ Upstream commit 7ab91f2 ] In lag mode, setting roce enabled/disable of lag device have no effect. e.g.: bond device (roce/vf_lag) roce status remain unchanged. Therefore disable it and add an error message. Fixes: cc9defc ("net/mlx5: Handle "enable_roce" devlink param") 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>
1 parent 8dafb48 commit 5decdc8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/devlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ static int mlx5_devlink_enable_roce_validate(struct devlink *devlink, u32 id,
282282
NL_SET_ERR_MSG_MOD(extack, "Device doesn't support RoCE");
283283
return -EOPNOTSUPP;
284284
}
285-
if (mlx5_core_is_mp_slave(dev)) {
286-
NL_SET_ERR_MSG_MOD(extack, "Multi port slave device can't configure RoCE");
285+
if (mlx5_core_is_mp_slave(dev) || mlx5_lag_is_active(dev)) {
286+
NL_SET_ERR_MSG_MOD(extack, "Multi port slave/Lag device can't configure RoCE");
287287
return -EOPNOTSUPP;
288288
}
289289

0 commit comments

Comments
 (0)