net/mlx5: E-Switch, Use vport metadata matching by default
Multiple features use metadata matching such as bond vport in live migration, multi-port RoCE mode, stacked devices; hence, enable vport metadata matching by default. Fixes: 1e62e222db2e ("net/mlx5: E-Switch, Use vport metadata matching only when mandatory") Signed-off-by: Vu Pham <vuhuong@mellanox.com> Reviewed-by: Bodong Wang <bodong@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Parav Pandit <parav@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
fc99c3d637
commit
cd1ef96621
@ -1864,18 +1864,6 @@ esw_check_vport_match_metadata_supported(const struct mlx5_eswitch *esw)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
esw_check_vport_match_metadata_mandatory(const struct mlx5_eswitch *esw)
|
||||
{
|
||||
return mlx5_core_mp_enabled(esw->dev);
|
||||
}
|
||||
|
||||
static bool esw_use_vport_metadata(const struct mlx5_eswitch *esw)
|
||||
{
|
||||
return esw_check_vport_match_metadata_mandatory(esw) &&
|
||||
esw_check_vport_match_metadata_supported(esw);
|
||||
}
|
||||
|
||||
u32 mlx5_esw_match_metadata_alloc(struct mlx5_eswitch *esw)
|
||||
{
|
||||
u32 num_vports = GENMASK(ESW_VPORT_BITS - 1, 0) - 1;
|
||||
@ -2159,9 +2147,9 @@ int esw_offloads_enable(struct mlx5_eswitch *esw)
|
||||
|
||||
err = mlx5_esw_host_number_init(esw);
|
||||
if (err)
|
||||
goto err_vport_metadata;
|
||||
goto err_metadata;
|
||||
|
||||
if (esw_use_vport_metadata(esw))
|
||||
if (esw_check_vport_match_metadata_supported(esw))
|
||||
esw->flags |= MLX5_ESWITCH_VPORT_MATCH_METADATA;
|
||||
|
||||
err = esw_offloads_metadata_init(esw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user