ntb_mw_set_trans(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ntb_mw_set_trans(9) β€” Kernel API Manual πŸŽ€

okay bestie, welcome to the ntb_mw_set_trans(9) page, straight out of the Kernel API Manual ✨ this one's a tiny little function with a very specific job: it sets the translation of an inbound memory window. that's it. that's the whole vibe check. πŸ¦‹


🌸 SYNOPSIS 🌸

fr fr here's the whole signature, don't touch it, it's perfect:

int ntb_mw_set_trans (struct ntb_dev *ntb , int pidx , int widx ,
dma_addr_t addr , resource_size_t size );

✨ ARGUMENTS ✨

  • ntb β€” the NTB device context. your main character struct, basically πŸ‘‘
  • pidx β€” port index of the peer device. yep, we're specifying which friend we're talking to 🫢
  • widx β€” memory window index. which window, bestie? this one πŸ’…
  • addr β€” the dma address of local memory to expose to the peer. like, the address of the stuff you're showing off 🌈
  • size β€” the size of the local memory to expose to the peer. how much of the goods πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this call sets the translation of a memory window. the peer may access local memory through the window starting at the address, up to the size. literally that simple, no cap.

but here's the part where you gotta pay attention πŸ™ˆ β€” the address and size must be aligned in compliance with restrictions of ntb_mw_get_align. and the region size should not exceed the size_max parameter of that method. so go check ntb_mw_get_align first, i'm begging 😭 it's giving "read the prerequisites before you start the assignment."

⚠️ also! this method may not be implemented due to the hardware specific memory windows interface. so like, don't be shocked if it's just not there. hardware said no. πŸ’€

⭐ RETURN ⭐

zero on success, otherwise an error number. slay when it's zero, 🧚 when it's not.


πŸ’œ SEE ALSO πŸ’œ

like i said, the whole friend group 😭 go say hi to all of them.


anyway, that's the page!! this one ships out of ./include/linux and the version on the label is dated October 2026 πŸ“… β€” so like, mark your calendar bestie, and remember: read ntb_mw_get_align before you set anything. mwah πŸ’‹βœ¨πŸ¦‹

πŸ“¦ where this page comes from