tb_tunnel_alloc_usb3(9)
β¨ tb_tunnel_alloc_usb3(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for tb_tunnel_alloc_usb3(9) β yes the whole function name is the page name, we love a self-titled icon π
π NAME π
tb_tunnel_alloc_usb3 β allocate a USB3 tunnel
like, literally, it makes a USB3 tunnel. that's the whole gig π«Ά
πΈ SYNOPSIS πΈ
struct tb_tunnel * tb_tunnel_alloc_usb3 (struct tb *tb , struct tb_port
*up , struct tb_port *down , int max_up , int max_down );
that's the whole signature, no cap β copy it exactly, don't get cute with it π
π¦ ARGUMENTS π¦
tbβ Pointer to the domain structure. this is the big-picture domain context, the main character energy of the whole thing πupβ USB3 upstream adapter port. the "up" one. keep that in mind, it matters later πdownβ USB3 downstream adapter port. the matching "down" one. they're a set, fr fr πmax_upβ Maximum available upstream bandwidth for the USB3 tunnel. and listen: it's0if there's no available bandwidth. zero means none, bestie, don't misinterpret it πmax_downβ Maximum available downstream bandwidth for the USB3 tunnel. also0if no available bandwidth. same deal, same0π«
π§ DESCRIPTION π§
so what does it actually do? it allocates a USB3 tunnel. that's it, that's the vibe β¨
β οΈ but here's the rule you CANNOT skip: the ports must be of typeTB_TYPE_USB3_UPandTB_TYPE_USB3_DOWN. like, that's not a suggestion, that's the requirement. wrong type = wrong vibe = we don't do that here π
π RETURN π
it hands you back a Pointer to struct tb_tunnel π β¦ or NULL in case of failure π (and yeah, failure is a real possibility, so check it, bestie, please check it π)
β SEE ALSO β
okay this list is LONG and honestly kind of iconic, so here's the full squad, no skipping, no summarising, we list every single one π
Kernel file ./drivers/thunderbolt/tunnel.c, plus:
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_alloc_dma(9)tb_tunnel_match_dma(9)tb_tunnel_discover_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)
go read them. iykyk ππ
and that's the page!! footer vibes: this beauty lives in ./drivers/thunderbolt, it's dated October 2026, and yep β it's still tb_tunnel_alloc_usb3(9) ππ slay, go allocate some tunnels bestie π¦β¨
π¦ 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