Skip to content

Commit 046e292

Browse files
shayshyigregkh
authored andcommitted
net/mlx5: Disable devlink reload for lag devices
[ Upstream commit edac23c ] Devlink reload can't be allowed on lag devices since reloading one lag device will cause traffic on the bond to get stucked. Users who wish to reload a lag device, need to remove the device from the bond, and only then reload it. Fixes: 4383cfc ("net/mlx5: Add devlink reload") 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 5decdc8 commit 046e292

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
137137
{
138138
struct mlx5_core_dev *dev = devlink_priv(devlink);
139139

140+
if (mlx5_lag_is_active(dev)) {
141+
NL_SET_ERR_MSG_MOD(extack, "reload is unsupported in Lag mode\n");
142+
return -EOPNOTSUPP;
143+
}
144+
140145
switch (action) {
141146
case DEVLINK_RELOAD_ACTION_DRIVER_REINIT:
142147
mlx5_unload_one(dev, false);

0 commit comments

Comments
 (0)