tb_tunnel_alloc_usb3(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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's 0 if there's no available bandwidth. zero means none, bestie, don't misinterpret it 😭
  • max_down β€” Maximum available downstream bandwidth for the USB3 tunnel. also 0 if no available bandwidth. same deal, same 0 🫠

🧚 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 type TB_TYPE_USB3_UP and TB_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:

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