summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorZhi Wang <zhiw@nvidia.com>2026-07-22 10:39:09 +0300
committerDanilo Krummrich <dakr@kernel.org>2026-07-23 14:20:24 +0200
commit6afbbc27f582b873eb42744b09d57aeefc9e5628 (patch)
tree77e9ca331d4d98c3fb37f12a8fc249e45f68a95d /tools/perf/scripts/python/bin
parent7cffd051ae546e8644bf9bf7410b63541f666845 (diff)
rust: pci: add sriov_get_totalvfs() helper
Expose pci_sriov_get_totalvfs() to Rust PCI drivers so they can query how many SR-IOV VFs a device supports. Use a conditional C helper because the !CONFIG_PCI_IOV version of pci_sriov_get_totalvfs() is a static inline function and is therefore not emitted into the Rust bindings. Return Option<NonZero<u16>> so Rust callers must handle the zero value that represents unavailable SR-IOV. Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: David Laight <david.laight.linux@gmail.com> Cc: Gary Guo <gary@garyguo.net> Cc: linux-pci@vger.kernel.org Link: https://lore.kernel.org/all/DJHPRE4TGGT8.BUTMYOF5YE05@nvidia.com/ Signed-off-by: Zhi Wang <zhiw@nvidia.com> Link: https://patch.msgid.link/20260722073913.1807677-3-zhiw@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions