tb_tunnel_alloc_dma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tb_tunnel_alloc_dma(9) πŸ’–

okay so this is a page from the Kernel API Manual and bestie, it's literally about allocating a DMA tunnel. Strap in, it's giving kernel-internals realness and honestly? kind of iconic.


✨ NAME ✨

tb_tunnel_alloc_dma β€” allocate a DMA tunnel πŸŒ€


πŸŽ€ SYNOPSIS πŸŽ€

struct tb_tunnel * tb_tunnel_alloc_dma (struct tb *tb , struct tb_port
*nhi , struct tb_port *dst , int transmit_path , int transmit_ring , int
receive_path , int receive_ring );

(yes it's a whole mouthful, copy it exactly, don't @ me πŸ’…)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tb β€” Pointer to the domain structure. like, the whole domain vibe check 🌈
  • nhi β€” Host controller port. the main character port fr πŸ‘‘
  • dst β€” Destination null port which the other domain is connected to. it's the port on the other side, slay πŸ’«
  • transmit_path β€” HopID used for transmitting packets. that's the ID for the send-direction hops πŸ›«
  • transmit_ring β€” NHI ring number used to send packets towards the other domain. set this to -1 if the TX path is not needed, k? lowkey important πŸ™ˆ
  • receive_path β€” HopID used for receiving packets. the ID for the receive-direction hops πŸ›¬
  • receive_ring β€” NHI ring number used to receive packets from the other domain. set this to -1 if the RX path is not needed either πŸ’€

⭐ RETURN ⭐

Pointer to struct tb_tunnel, or NULL in case of failure. so like, check it before you use it bestie, no cap 🫢


🌸 SEE ALSO 🌸

Kernel file ./drivers/thunderbolt/tunnel.c β€” and the whole friend group:


πŸ’‘ friendly reminder: -1 on transmit_ring or receive_ring means that direction isn't needed β€” don't come for me if you pass -1 and then wonder why a path is missing, iykyk 😭

and that's the whole page, bestie!! sourced from ./drivers/thunderbolt, dated October 2026 β€” go forth and allocate responsibly πŸ§šβ€β™€οΈβœ¨πŸ’œ

πŸ“¦ where this page comes from