rdma_user_mmap_io(9)
π rdma_user_mmap_io β the Kernel API Manual moment π
ok so bestie, welcome to the rdma_user_mmap_io(9) page π
this one lives in the Kernel API Manual and honestly it's giving "quietly crucial glue code" energy β¨
πΈ NAME πΈ
rdma_user_mmap_io β map IO memory into a process π«Ά
β SYNOPSIS β
int rdma_user_mmap_io (struct ib_ucontext *ucontext , struct
vm_area_struct *vma , unsigned long pfn , unsigned long size , pgprot_t
prot , struct rdma_user_mmap_entry *entry );
like, six arguments, one int back, no cap π
π ARGUMENTS π
ucontextβ the associated user context, bestie. it's literally right there in the name β¨vmaβ thevmarelated to the currentmmapcall π¦pfnβ thepfnto map. pfn, pfn, pfn πsizeβ the size to map πΈprotβ thepgprotto use in the remap call π₯entryβ themmap_entryyou got fromrdma_user_mmap_entry_get, orNULLifmmap_entryisn't used by the driver π (yes,NULLis a whole valid vibe here)
π DESCRIPTION π
okay so here's the tea β β drivers are supposed to call this as part of their mmap functions if they wish to send something like PCI-E BAR memory to userspace π« that's the whole assignment, and it ate.
Return values, listen up, because these matter:
-EINVALon wrong flags or size π-EAGAINon failure to map π0on success π slay
π SEE ALSO π
- Kernel file
./drivers/infiniband/core/ib_core_uverbs.cβ go read it, iykyk π rdma_umap_priv_init(9)rdma_user_mmap_entry_get_pgoff(9)rdma_user_mmap_entry_get(9)rdma_user_mmap_entry_put(9)rdma_user_mmap_entry_remove(9)rdma_user_mmap_entry_insert_range(9)rdma_user_mmap_entry_insert(9)rdma_udata_to_dev(9)_uverbs_alloc(9)uverbs_get_buffer_desc(9)
the way that's eleven whole references and every single one made the list π€ no skipping, that's the rule π§
fr fr read the return codes before you ship β-EINVALand-EAGAINare not decorational π
and that's the page, bestie π«Ά this iconic little doc comes from ./drivers/infiniband/core, dated October 2026 β stamp it, frame it, put it on the fridge ππ
π¦ 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