tb_tunnel_alloc_dma(9)
π 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-1if 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-1if 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:
tb_available_credits(9)tb_tunnel_event(9)tb_tunnel_discover_pci(9)tb_tunnel_alloc_pci(9)tb_tunnel_reserved_pci(9)tb_dp_bandwidth_mode_maximum_bandwidth(9)tb_tunnel_discover_dp(9)tb_tunnel_alloc_dp(9)tb_tunnel_match_dma(9)tb_tunnel_discover_usb3(9)tb_tunnel_alloc_usb3(9)tb_tunnel_is_invalid(9)tb_tunnel_activate(9)tb_tunnel_deactivate(9)tb_tunnel_port_on_path(9)tb_tunnel_maximum_bandwidth(9)tb_tunnel_allocated_bandwidth(9)tb_tunnel_alloc_bandwidth(9)tb_tunnel_consumed_bandwidth(9)tb_tunnel_release_unused_bandwidth(9)tb_tunnel_reclaim_available_bandwidth(9)
π‘ friendly reminder:-1ontransmit_ringorreceive_ringmeans that direction isn't needed β don't come for me if you pass-1and 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
- 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