The call to mlx5_eswitch_enable() also does the same check
and if E-Switch not supported it returns 0 without any change.
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
struct mlx5_core_sriov *sriov = &dev->priv.sriov;
int err, vf, num_msix_count;
- if (!MLX5_ESWITCH_MANAGER(dev))
- goto enable_vfs_hca;
-
err = mlx5_eswitch_enable(dev->priv.eswitch, num_vfs);
if (err) {
mlx5_core_warn(dev,
return err;
}
-enable_vfs_hca:
num_msix_count = mlx5_get_default_msix_vec_count(dev, num_vfs);
for (vf = 0; vf < num_vfs; vf++) {
/* Notify the VF before its enablement to let it set