ib_map_mr_sg_pi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ ib_map_mr_sg_pi(9) β€” the Kernel API Manual page, bestie edition

okay so picture this: it's a page from the Kernel API Manual, and today's main character is ib_map_mr_sg_pi(9). yes, that name is a mouthful, no, we're not abbreviating it. it's about mapping dma-mapped SG lists for PI (that's protection information, iykyk) and setting up an appropriate memory region so it's ready for registration. that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

int ib_map_mr_sg_pi (struct ib_mr *mr , struct scatterlist *data_sg ,
int data_sg_nents , unsigned int *data_sg_offset , struct scatterlist
*meta_sg , int meta_sg_nents , unsigned int *meta_sg_offset , unsigned
int page_size );

look at that signature. nine whole parameters. it ate and left no crumbs. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

every single one of them, in order, no skips:

  • mr β€” the memory region. it's giving "main character energy" because literally everything happens to it. πŸ‘‘
  • data_sg β€” the dma mapped scatterlist for the data. like the actual payload bestie.
  • data_sg_nents β€” how many entries are in data_sg. the count. the headcount. πŸ™ˆ
  • data_sg_offset β€” offset in bytes into data_sg. yes, bytes. don't @ me.
  • meta_sg β€” the dma mapped scatterlist for the metadata. the sidecar. the little friend that comes along. πŸ“
  • meta_sg_nents β€” how many entries are in meta_sg. another headcount, another day.
  • meta_sg_offset β€” offset in bytes into meta_sg. also bytes. consistency slay. ✨
  • page_size β€” the page vector's desired page size. it's the vibe setter for pages, fr fr.

🌸 DESCRIPTION 🌸

so here are the Constraints β€” and when I say constraints I mean the rules you do not break, no cap:

  • The MR must be allocated with type IB_MR_TYPE_INTEGRITY. that's it, that's the constraint. if you didn't do that, it's not gonna work, and that's on you bestie. πŸ’€

After this completes successfully, the memory region is ready for registration. so like, do the call, get the good result, and your MR is all dressed up and ready to be registered. iconic behavior only. πŸ’–


⭐ RETURN ⭐

0 on success. that's the whole section. zero means yay. 🫢


🌈 SEE ALSO 🌈

okay this is the group chat roster and every single member is here:

Kernel file ./drivers/infiniband/core/verbs.c


quick vibe check before you go: IB_MR_TYPE_INTEGRITY is not optional. it's not a suggestion. it's the law. πŸ”₯

and that's the page!! this little manual lives in ./drivers/infiniband/core and it's dated October 2026 β€” so go forth, map those SG lists for PI, and remember: the MR was ready for registration all along. πŸ§šπŸ’œ bye bestie!!

πŸ“¦ where this page comes from