pci_sriov_get_totalvfs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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