tb_tunnel_alloc_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_tunnel_alloc_bandwidth ✨

okay so this is a page from the Kernel API Manual (section 9, kernel land bestie πŸ’…) and it's all about tb_tunnel_alloc_bandwidth β€” literally the glow-up button for a tunnel's bandwidth allocation πŸ¦‹


🌸 NAME 🌸

tb_tunnel_alloc_bandwidth β€” change tunnel bandwidth allocation. that's it, that's the whole vibe πŸŽ€


⭐ SYNOPSIS ⭐

int tb_tunnel_alloc_bandwidth (struct tb_tunnel *tunnel , int *alloc_up
, int *alloc_down );

copy it exactly, no cap πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • tunnel β€” the tunnel whose bandwidth allocation you're changing. your main character 🫢
  • alloc_up β€” new upstream bandwidth, in Mb/s. upward vibes ⬆️
  • alloc_down β€” new downstream bandwidth, in Mb/s. downward vibes ⬇️

🧚 DESCRIPTION 🧚

the way this one is simple: it tries to change the tunnel bandwidth allocation. that's the whole function. it's giving "short but iconic" πŸ‘‘

lowkey important: you're asking for alloc_up and alloc_down values, not demanding them β€” see RETURN for why that matters πŸ™ˆ

🌈 RETURN 🌈

  • 0 β€” on success πŸ’€βœ¨ and here's the slay part: it updates alloc_up and alloc_down to the values that were actually allocated β€” which may not be the same as the ones you passed in originally. so read them back, bestie, fr fr.
  • Negative errno β€” in case of failure 😭 classic kernel move.

πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/thunderbolt/tunnel.c, plus the whole tunnel squad 🫢:


mwah πŸ’‹ that's the page β€” from ./drivers/thunderbolt, dated October 2026, and yes the page name is tb_tunnel_alloc_bandwidth(9) in case you forgot already πŸ˜­πŸ’–

πŸ“¦ where this page comes from