pci_sriov_get_totalvfs(9)
π pci_sriov_get_totalvfs β the Kernel API Manual, bestie edition
okay so real talk, this one's from the Kernel API Manual and it's genuinely such a little icon. it's giving "small function, big responsibilities" and honestly? we're obsessed. π
β¨ NAME β¨
pci_sriov_get_totalvfs β get total VFs supported on this device π¦
like, the whole entire vibe of this function is "hey how many Virtual Functions can this thing actually handle," and it answers you. periodt. π
πΈ SYNOPSIS πΈ
unsigned int pci_sriov_get_totalvfs (struct pci_dev *dev );
that's it. that's the whole call. she takes one pointer and returns an unsigned int. no cap, super clean. β¨
π ARGUMENTS π
devβ the PCI PF device. that's the Physical Function, the main-character device of the SRIOV situation π
π₯ DESCRIPTION π₯
so here's the tea π: if you've got a PCIe device that supports SRIOV, this function hands you back the PCIe SRIOV capability value of TotalVFs β OR, if the driver went and reduced it, the value of driver_max_VFs instead. either way you get the real, actual number you should care about. π―
and if the device doesn't support SRIOV? you get 0. that's it. no drama, no error, just a nice little zero. π
π SEE ALSO π
the kernel file lives at ./drivers/pci/iov.c β go pay her a visit, she's iconic π
and here's the whole friend group, no one left out, fr fr:
pci_iov_get_pf_drvdata(9)pci_iov_init(9)pci_iov_release(9)pci_iov_remove(9)pci_iov_update_resource(9)pci_sriov_resource_alignment(9)pci_restore_iov_state(9)pci_vf_drivers_autoprobe(9)pci_iov_bus_range(9)pci_enable_sriov(9)pci_disable_sriov(9)pci_num_vf(9)pci_vfs_assigned(9)pci_sriov_set_totalvfs(9)pci_sriov_configure_simple(9)pci_iov_vf_bar_set_size(9)pci_iov_vf_bar_get_sizes(9)
like okay, pci_sriov_set_totalvfs(9) is literally right there in the list β she's the setter, this page is the getter, they're a matched set, iykyk π«Ά
and that's the whole page bestie, go forth and count your VFs π
mwah π β this gem ships out of ./drivers/pci, dated October 2026, and it's filed under pci_sriov_get_totalvfs(9) in the Kernel API Manual. see you in the group chat π§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms