pci_p2pdma_enable_store(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_p2pdma_enable_store(9) β€” from the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, this one is pci_p2pdma_enable_store from the Kernel API Manual, and yes we are absolutely going to understand it together. grab a boba, we got this πŸ§‹βœ¨


✨ NAME ✨

pci_p2pdma_enable_store β€” it parses a configfs/sysfs attribute store so you can enable p2pdma. that's literally her whole job πŸ’…


🌸 SYNOPSIS 🌸

int pci_p2pdma_enable_store (const char *page , struct pci_dev **p2p_dev
, bool *use_p2pdma );

she's giving "three arguments, zero drama" energy. periodt πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • page β€” the contents of the value that's being stored. like, what actually landed in the attribute ✨
  • p2p_dev β€” this one returns the PCI device that got selected to be used. and yes, only if one was actually specified in the stored value β€” if not, nothing to hand back πŸ™ˆ
  • use_p2pdma β€” returns whether we should enable p2pdma or not. cute little on/off verdict πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so what she does: she parses an attribute value to decide whether to enable p2pdma. that's the whole vibe check 🫢

and the value can be one of two things:

  • a PCI device β€” picked out using its full BDF device name πŸŽ€
  • a boolean β€” in any format kstrtobool accepts, so she's flexible like that πŸ’…

here's the mapping, and this part matters so pay attention bestie:

  • a false value disables p2pdma 🚫
  • a true value means the caller is expected to automatically find a compatible device πŸ”
  • specifying a PCI device means the caller is expected to use that specific provider πŸ‘‘

also, quick side note: pci_p2pdma_enable_show should be used as the show operation for the attribute. they're a matching set, iykyk πŸ’–

and the best part? Returns 0 on success. iconic. no notes. ✨


🌈 SEE ALSO 🌈

kernel file ./drivers/pci/p2pdma.c, plus the whole friend group:


okay that's the whole page, you ate that fr fr πŸ’œ this lil slice of ./drivers/pci was brought to you by October 2026 β€” mwah, slay, see you in the next man page πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from