Skip to content

Commit 97bd788

Browse files
Jiri PirkoSaeed Mahameed
authored andcommitted
net/mlx5: Skip inline mode check after mlx5_eswitch_enable_locked() failure
Commit bffaa91 ("net/mlx5: E-Switch, Add control for inline mode") added inline mode checking to esw_offloads_start() with a warning printed out in case there is a problem. Tne inline mode checking was done even after mlx5_eswitch_enable_locked() call failed, which is pointless. Later on, commit 8c98ee7 ("net/mlx5e: E-Switch, Add extack messages to devlink callbacks") converted the error/warning prints to extack setting, which caused that the inline mode check error to overwrite possible previous extack message when mlx5_eswitch_enable_locked() failed. User then gets confusing error message. Fix this by skipping check of inline mode after mlx5_eswitch_enable_locked() call failed. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent de1f0a6 commit 97bd788

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2178,6 +2178,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw,
21782178
"Failed setting eswitch to offloads");
21792179
esw->mode = MLX5_ESWITCH_LEGACY;
21802180
mlx5_rescan_drivers(esw->dev);
2181+
return err;
21812182
}
21822183
if (esw->offloads.inline_mode == MLX5_INLINE_MODE_NONE) {
21832184
if (mlx5_eswitch_inline_mode_get(esw,
@@ -2187,7 +2188,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw,
21872188
"Inline mode is different between vports");
21882189
}
21892190
}
2190-
return err;
2191+
return 0;
21912192
}
21922193

21932194
static void mlx5_esw_offloads_rep_mark_set(struct mlx5_eswitch *esw,

0 commit comments

Comments
 (0)