mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
net/mlx5: Skip inline mode check after mlx5_eswitch_enable_locked() failure
Commitbffaa91658
("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, commit8c98ee77d9
("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>
This commit is contained in:
parent
de1f0a6508
commit
97bd788efb
@ -2178,6 +2178,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw,
|
||||
"Failed setting eswitch to offloads");
|
||||
esw->mode = MLX5_ESWITCH_LEGACY;
|
||||
mlx5_rescan_drivers(esw->dev);
|
||||
return err;
|
||||
}
|
||||
if (esw->offloads.inline_mode == MLX5_INLINE_MODE_NONE) {
|
||||
if (mlx5_eswitch_inline_mode_get(esw,
|
||||
@ -2187,7 +2188,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw,
|
||||
"Inline mode is different between vports");
|
||||
}
|
||||
}
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mlx5_esw_offloads_rep_mark_set(struct mlx5_eswitch *esw,
|
||||
|
Loading…
Reference in New Issue
Block a user