]> asedeno.scripts.mit.edu Git - linux.git/commit
net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API
authorParav Pandit <parav@mellanox.com>
Thu, 21 Mar 2019 22:51:30 +0000 (15:51 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Mar 2019 19:09:29 +0000 (12:09 -0700)
commiteb5cc431f17bc7a656c9290743d1809ac43c1c47
treed18df882cd12ce321bc3f643ce82d8a6afd1bb2c
parent2aca178760288936b8b3030ca83fa53082948736
net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API

It is desired to get rid of num_vfs stored inside mlx5_core_sriov to
safely support vports more than vfs.
To reduce dependency on mlx5_core_sriov num_vfs, start using
pci_num_vf() from pci core.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/sriov.c