ntb_peer_mw_get_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ ntb_peer_mw_get_addr β€” a kernel API manual moment

okay so bestie, welcome to ntb_peer_mw_get_addr(9), straight out of the Kernel API Manual and honestly? it's giving "small function, big main character energy" ✨


πŸ’– NAME πŸ’–

ntb_peer_mw_get_addr β€” get map address of an outbound memory window

like literally, it hands you the map address. that's the whole vibe. πŸ—ΊοΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

int ntb_peer_mw_get_addr (struct ntb_dev *ntb , int widx , phys_addr_t
*base , resource_size_t *size );

no cap, that's the signature. copy it exactly, don't be weird about it πŸ’…


🌸 ARGUMENTS 🌸

  • ntb β€” the NTB device context. your little device passport, y'know? πŸͺͺ
  • widx β€” the memory window index. and yes, it lives within the ntb_peer_mw_count return value, so keep that in mind fr fr πŸŽ€
  • base β€” OUT β€” the base address of the mapping region. this one gets written for you 🫢
  • size β€” OUT β€” the size of the mapping region. also written for you πŸ’–

✨ DESCRIPTION ✨

so basically you call this to get the base and size of the memory region you wanna map. lowkey iconic.

here's the tea though: NULL may be given for any output parameter if the value is not needed 😌 so if you don't care about size, just pass NULL and move on. no guilt, bestie.

and what do you do with base and size once you have them? you use them for mapping the memory window β€” to access the peer memory. that's the whole point. that's the assignment. πŸ”₯


⭐ RETURN ⭐

Zero on success 🌈 otherwise a negative error number 😭 (yes, the classic. zero good, negative bad.)


πŸŽ€ SEE ALSO πŸŽ€

the Kernel file ./include/linux/ntb.h and honestly the entire extended ntb cinematic universe πŸ‘‘

like, read them. all of them. iykyk 🧚


ok that's the whole page bestie, no gatekeeping πŸ’œ go forth and map that window.

and finally, the cute little sign-off: this one's sourced from ./include/linux and dated October 2026 β€” periodt, that's the footer, slay πŸ“πŸ’…

πŸ“¦ where this page comes from