Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d66a2711 authored by Daniel Jurgens's avatar Daniel Jurgens Committed by Greg Kroah-Hartman
Browse files

net/mlx5: Allow 0 for total host VFs



commit 2dc2b3922d3c0f52d3a792d15dcacfbc4cc76b8f upstream.

When querying eswitch functions 0 is a valid number of host VFs. After
introducing ARM SRIOV falling through to getting the max value from PCI
results in using the total VFs allowed on the ARM for the host.

Fixes: 86eec50b ("net/mlx5: Support querying max VFs from device");
Signed-off-by: default avatarDaniel Jurgens <danielj@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d7b2df97
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -211,7 +211,6 @@ static u16 mlx5_get_max_vfs(struct mlx5_core_dev *dev)
		host_total_vfs = MLX5_GET(query_esw_functions_out, out,
					  host_params_context.host_total_vfs);
		kvfree(out);
		if (host_total_vfs)
		return host_total_vfs;
	}