diff options
author | Wei Yang <[email protected]> | 2015-03-25 16:23:47 +0800 |
---|---|---|
committer | Benjamin Herrenschmidt <[email protected]> | 2015-03-31 13:02:36 +1100 |
commit | 4449f079722c86d2f6925da039835acdd8e973a8 (patch) | |
tree | 52eafc1494e73fb9a1b630a50cd8b15f339cac78 /lib/test-string_helpers.c | |
parent | f59dca27d20c73500c4a88ab9a077e40669755db (diff) |
PCI: Calculate maximum number of buses required for VFs
An SR-IOV device can change its First VF Offset and VF Stride based on the
values of ARI Capable Hierarchy and NumVFs. The number of buses required
for all VFs is determined by NumVFs, First VF Offset, and VF Stride (see
SR-IOV spec r1.1, sec 2.1.2).
Previously pci_iov_bus_range() computed how many buses would be required by
TotalVFs, but this was based on a single NumVFs value and may not have been
the maximum for all NumVFs configurations.
Iterate over all valid NumVFs and calculate the maximum number of bus
numbers that could ever be required for VFs of this device.
[bhelgaas: changelog, compute busnr of NumVFs, not TotalVFs, remove
kerenl-doc comment marker]
Signed-off-by: Wei Yang <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions