Skip to content

RFC pci/sriov: support VFs dynamic addition

Longpeng(Mike) linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pci/sriov: extract sriov_numvfs common helperdrivers/pci/iov.c+23 -150 replies
2/4pci/sriov: add vf_bitmap to mark the vf id allocationdrivers/pci/iov.c drivers/pci/pci.h+14 -00 replies
3/4pci/sriov: add sriov_numfs_no_scan interfacedrivers/pci/iov.c+64 -00 replies
4/4pci/sriov: add sriov_scan_vf_id interfacedrivers/pci/iov.c+47 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/4] pci/sriov: support VFs dynamic addition

From: Longpeng <[email protected]>

We can enable SRIOV and add VFs by /sys/bus/pci/devices/..../sriov_numvfs, but this operation needs to spend lots of time if there has a large amount of VFs.

For example, if the machine has 10 PFs and 250 VFs per-PF, enable all the VFs concurrently would cost about 200-250ms. However most of them are not need to be used at the moment, so we can enable SRIOV first but add VFs on demand.

This series introduces two interfaces:
1. sriov_numvfs_no_scan: enable SRIOV without add the VFs.
2. sriov_scan_vf_id: add a specific VF.

Longpeng (4):
pci/sriov: extract sriov_numvfs common helper pci/sriov: add vf_bitmap to mark the vf id allocation pci/sriov: add sriov_numfs_no_scan interface pci/sriov: add sriov_scan_vf_id interface

 drivers/pci/iov.c | 162 +++++++++++++++++++++++++++++++++++++++++-----
 drivers/pci/pci.h |   1 +
 2 files changed, 148 insertions(+), 15 deletions(-)
Signature · 1 line
2.23.0