rdma_user_mmap_io(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the vma related to the current mmap call πŸ¦‹
  • pfn β€” the pfn to map. pfn, pfn, pfn πŸ’…
  • size β€” the size to map 🌸
  • prot β€” the pgprot to use in the remap call πŸ”₯
  • entry β€” the mmap_entry you got from rdma_user_mmap_entry_get, or NULL if mmap_entry isn't used by the driver πŸ™ˆ (yes, NULL is 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:

  • -EINVAL on wrong flags or size πŸ’€
  • -EAGAIN on failure to map 😭
  • 0 on success πŸŽ‰ slay

🌈 SEE ALSO 🌈

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 β€” -EINVAL and -EAGAIN are 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