lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 111/663] net/mlx5: Disable devlink reload for lag devices
    Date
    From: Shay Drory <shayd@nvidia.com>

    [ Upstream commit edac23c2b3d3ac64cfcd351087295893671adbf5 ]

    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: 4383cfcc65e7 ("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>
    ---
    drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
    index 0450ab5f5f756..bf5cf022e279d 100644
    --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
    +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
    @@ -137,6 +137,11 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
    {
    struct mlx5_core_dev *dev = devlink_priv(devlink);

    + if (mlx5_lag_is_active(dev)) {
    + NL_SET_ERR_MSG_MOD(extack, "reload is unsupported in Lag mode\n");
    + return -EOPNOTSUPP;
    + }
    +
    switch (action) {
    case DEVLINK_RELOAD_ACTION_DRIVER_REINIT:
    mlx5_unload_one(dev, false);
    --
    2.27.0


    \
     
     \ /
      Last update: 2021-03-02 04:10    [W:2.296 / U:0.764 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site