Skip to content

Commit a824d01

Browse files
danielj-mellanoxgregkh
authored andcommitted
net/mlx5: Allow 0 for total host VFs
commit 2dc2b39 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: 86eec50 ("net/mlx5: Support querying max VFs from device"); Signed-off-by: Daniel Jurgens <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ab06983 commit a824d01

File tree

1 file changed

+1
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/sriov.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ static u16 mlx5_get_max_vfs(struct mlx5_core_dev *dev)
264264
host_total_vfs = MLX5_GET(query_esw_functions_out, out,
265265
host_params_context.host_total_vfs);
266266
kvfree(out);
267-
if (host_total_vfs)
268-
return host_total_vfs;
267+
return host_total_vfs;
269268
}
270269

271270
done:

0 commit comments

Comments
 (0)