rdma_user_m...insert_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 rdma_user_m...insert_range(9) 🌸

okay so this is a page from the Kernel API Manual, and today's main character is rdma_user_mmap_entry_insert_range β€” honestly the name alone is giving "I have a lot of hobbies" but bestie, she delivers πŸ’…


✨ NAME ✨

rdma_user_mmap_entry_insert_range β€” insert an entry to the mmap_xa in a given range. that's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

int rdma_user_mmap_entry_insert_range (struct ib_ucontext *ucontext ,
struct rdma_user_mmap_entry *entry , size_t length , u32 min_pgoff , u32
max_pgoff );

like, five whole arguments. she's high-maintenance but worth it 🫢


✨ ARGUMENTS ✨

  • ucontext β€” the associated user context. the context she's hanging out with, if you will πŸ’–
  • entry β€” the entry to insert into the mmap_xa. this is THE girl being inserted. iconic behavior ✨
  • length β€” length of the address that will be mmapped. how long it is. no notes πŸŽ€
  • min_pgoff β€” minimum pgoff to be returned. the floor, the bare minimum, the "you may not go below this" line πŸ¦‹
  • max_pgoff β€” maximum pgoff to be returned. the ceiling, the limit, the "okay that's enough" line 🌸

✨ DESCRIPTION ✨

so here's the tea β˜• β€” this function should be called by drivers that use the rdma_user_mmap interface for implementing their mmap syscall. like, that's who it's for. don't be out here calling it if you're not that driver, iykyk πŸ™ˆ

a database of mmap offsets is handled in the core, and helper functions are provided to insert entries into the database and extract entries when the user calls mmap with the given offset. literally the core is doing the record-keeping so you don't have to ✨

the function allocates a unique page offset in a given range that should be provided to user β€” and then the user will use the offset to retrieve information such as address to be mapped and how. so it's giving "here's your little ticket, go get your map" πŸŽŸοΈπŸ’–


✨ RETURN ✨

0 on success and -ENOMEM on failure. two outcomes, both valid, only one of them slays πŸ’€


✨ SEE ALSO ✨

that's the whole friend group right there, they all show up to the function-call party together πŸ‘‘πŸŒˆ


and that's a wrap!! this page came from the ./drivers/infiniband/core directory, dated October 2026, and it's titled rdma_user_m...insert_range(9). mwah, go touch some mmap offsets πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from