pci_sriov_re...ce_alignment(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 πŸ‘‘


πŸ’« 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