Commit 5403dc70 authored by Or Gerlitz's avatar Or Gerlitz Committed by Saeed Mahameed

net/mlx5: E-Switch, Err when retrieving steering name-space fails

Make sure to return error when we failed retrieving the FDB steering
name space. Also, while around, correctly print the error when mode
change revert fails in the warning message.
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reported-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent eff596da
...@@ -424,6 +424,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports) ...@@ -424,6 +424,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports)
root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB); root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
if (!root_ns) { if (!root_ns) {
esw_warn(dev, "Failed to get FDB flow namespace\n"); esw_warn(dev, "Failed to get FDB flow namespace\n");
err = -EOPNOTSUPP;
goto ns_err; goto ns_err;
} }
...@@ -655,7 +656,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw) ...@@ -655,7 +656,7 @@ static int esw_offloads_start(struct mlx5_eswitch *esw)
esw_warn(esw->dev, "Failed setting eswitch to offloads, err %d\n", err); esw_warn(esw->dev, "Failed setting eswitch to offloads, err %d\n", err);
err1 = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY); err1 = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY);
if (err1) if (err1)
esw_warn(esw->dev, "Failed setting eswitch back to legacy, err %d\n", err); esw_warn(esw->dev, "Failed setting eswitch back to legacy, err %d\n", err1);
} }
if (esw->offloads.inline_mode == MLX5_INLINE_MODE_NONE) { if (esw->offloads.inline_mode == MLX5_INLINE_MODE_NONE) {
if (mlx5_eswitch_inline_mode_get(esw, if (mlx5_eswitch_inline_mode_get(esw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment