summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2021-01-03 10:09:59 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2021-02-11 18:50:15 -0800
commit7ab91f2b03367f9d25dd807ebdfb0d67295e0e41 (patch)
treed082c8e7c6dd7ea11422527094dd6b45d6f292ad /drivers/net
parentc70f8597fcc1399ef6d5b5ce648a31d887d5dba2 (diff)
downloadlinux-stable-7ab91f2b03367f9d25dd807ebdfb0d67295e0e41.tar.gz
linux-stable-7ab91f2b03367f9d25dd807ebdfb0d67295e0e41.tar.bz2
linux-stable-7ab91f2b03367f9d25dd807ebdfb0d67295e0e41.zip
net/mlx5: Disallow RoCE on lag device
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: cc9defcbb8fa ("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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/devlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
index 317ce6b80b23..c7073193db14 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
@@ -273,8 +273,8 @@ static int mlx5_devlink_enable_roce_validate(struct devlink *devlink, u32 id,
NL_SET_ERR_MSG_MOD(extack, "Device doesn't support RoCE");
return -EOPNOTSUPP;
}
- if (mlx5_core_is_mp_slave(dev)) {
- NL_SET_ERR_MSG_MOD(extack, "Multi port slave device can't configure RoCE");
+ if (mlx5_core_is_mp_slave(dev) || mlx5_lag_is_active(dev)) {
+ NL_SET_ERR_MSG_MOD(extack, "Multi port slave/Lag device can't configure RoCE");
return -EOPNOTSUPP;
}