rdma_user_m...insert_range(9)
πΈ 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 themmap_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 β¨
- Kernel file
./drivers/infiniband/core/ib_core_uverbs.cβ go read the source bestie, it's right there π rdma_umap_priv_init(9)rdma_user_mmap_io(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(9)rdma_udata_to_dev(9)_uverbs_alloc(9)uverbs_get_buffer_desc(9)
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
- 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