hns_roce_mtr_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– hns_roce_mtr_create(9) πŸ’–

okay so bestie, welcome to the kernel API manual for hns_roce_mtr_create(9) β€” yes that's the section 9 one, we're in kernel-hacker territory now 🧚✨ this one's literally about creating an hns memory translate region, and honestly? it's giving "small function, big responsibility" πŸ‘‘


✨ NAME ✨

hns_roce_mtr_create β€” Create hns memory translate region. that's the whole vibe, no cap πŸŽ€


🌸 SYNOPSIS 🌸

int hns_roce_mtr_create (struct hns_roce_dev *hr_dev , struct
hns_roce_mtr *mtr , struct hns_roce_buf_attr *buf_attr , unsigned int
ba_page_shift , struct ib_udata *udata , unsigned long user_addr );

she takes six arguments and returns an int, periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

six of them, and yes we're doing all six, don't scroll past 🫢

  • hr_dev β€” RoCE device struct pointer. this is the device bestie herself πŸŽ€
  • mtr β€” memory translate region. the thing you're creating, main character energy fr ✨
  • buf_attr β€” buffer attribute for creating mtr. the buffer's whole personality πŸ”₯
  • ba_page_shift β€” page shift for multi-hop base address table. lowkey sounds scary but it's just the page shift for that multi-hop base address table, iykyk πŸ’œ
  • udata β€” user space context, if it's NULL, means kernel space. so like, NULL = kernel space, got it? that's the tea β˜•
  • user_addr β€” userspace virtual address to start at. starting point, literally 🌈

🌟 SEE ALSO 🌟

  • Kernel file ./drivers/infiniband/hw/hns/hns_roce_mr.c β€” go read the source, bestie, it's right there πŸ“–πŸ’–

πŸ’€ friendly reminder that the whole udata-being-NULL thing changes whether you're in user space or kernel space context, so don't sleep on it πŸ™ˆ

that's the whole page, no notes πŸ‘‘ ok bye, mwah πŸ’‹ β€” this little icon was brought to you by the <rainbow>hns_roce_mtr_create(9)</rainbow> manual in <pink>Kernel API Manual</pink>, straight outta <purple>./drivers/infiniband/hw/hns</purple>, dated <cyan>October 2026</cyan> πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from