pci_sriov_re...ce_alignment(9)
πΈ NAME πΈ
pci_sriov_resource_alignment β bestie, this one gets you the resource alignment for a VF BAR π
β¨ SYNOPSIS β¨
resource_size_t pci_sriov_resource_alignment (const struct pci_dev *dev
, int resno );
π ARGUMENTS π
devβ the PCI device, the main character of this whole situation π«Άresnoβ the resource number, aka which resource we're talking about
π DESCRIPTION π
okay so. This function returns the alignment of the VF BAR that it finds in the SR-IOV capability β¨
And here's the part where people get it twisted β it is NOT the same as the resource size. The resource size is defined as the VF BAR size multiplied by the number of VFs. Nope, no cap. The alignment is just the VF BAR size. Just the size. That's it. That's the whole vibe π¦
So if you were out here expecting alignment == size Γ num_VFs, not me catching you doing that π fr fr, alignment is simply the VF BAR size, periodt.
π₯ SEE ALSO π₯
Kernel file ./drivers/pci/iov.c β plus all these icon friends of hers, go check them out π
pci_iov_get_pf_drvdata(9)pci_iov_init(9)pci_iov_release(9)pci_iov_remove(9)pci_iov_update_resource(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_get_totalvfs(9)pci_sriov_configure_simple(9)pci_iov_vf_bar_set_size(9)pci_iov_vf_bar_get_sizes(9)
π« that's the whole page bestie, hope it slayed π«
This one lives over in ./drivers/pci, dated October 2026, and it's page pci_sriov_resource_alignment(9) of the Kernel API Manual β mwah, go read the source, ily, bye π§ββοΈπ
π¦ 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