diff options
author | Jason Gunthorpe <[email protected]> | 2022-02-24 16:20:10 +0200 |
---|---|---|
committer | Leon Romanovsky <[email protected]> | 2022-02-27 11:38:51 +0200 |
commit | 21ca9fb62d4688da41825e0f05d8e7e26afc69d6 (patch) | |
tree | 955bbb2dbc34c27364cfb7e270cc5655325833ee /net/lapb/lapb_timer.c | |
parent | cfb92440ee71adcc2105b0890bb01ac3cddb8507 (diff) |
PCI/IOV: Add pci_iov_vf_id() to get VF index
The PCI core uses the VF index internally, often called the vf_id,
during the setup of the VF, eg pci_iov_add_virtfn().
This index is needed for device drivers that implement live migration
for their internal operations that configure/control their VFs.
Specifically, mlx5_vfio_pci driver that is introduced in coming patches
from this series needs it and not the bus/device/function which is
exposed today.
Add pci_iov_vf_id() which computes the vf_id by reversing the math that
was used to create the bus/device/function.
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Jason Gunthorpe <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Yishai Hadas <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions