mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
net/mlx5: Set max number of embedded CPU VFs
Set the maximum number of embedded cpu VF functions available. Signed-off-by: Daniel Jurgens <danielj@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
6d98f314bf
commit
7057fe5619
|
|
@ -305,6 +305,7 @@ int mlx5_sriov_init(struct mlx5_core_dev *dev)
|
|||
total_vfs = pci_sriov_get_totalvfs(pdev);
|
||||
sriov->max_vfs = mlx5_get_max_vfs(dev);
|
||||
sriov->num_vfs = pci_num_vf(pdev);
|
||||
sriov->max_ec_vfs = mlx5_core_ec_sriov_enabled(dev) ? pci_sriov_get_totalvfs(dev->pdev) : 0;
|
||||
sriov->vfs_ctx = kcalloc(total_vfs, sizeof(*sriov->vfs_ctx), GFP_KERNEL);
|
||||
if (!sriov->vfs_ctx)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user