hns_roce_mtr_create(9)
π 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'sNULL, 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 wholeudata-being-NULLthing 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
- 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