usb4_usb3_po...ed_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… usb4_usb3_port_allocated_bandwidth(9) πŸ’…

okay so this is a page straight out of the Kernel API Manual and it's literally about asking a USB3 port "hey bestie, how much bandwidth are you currently rocking?" 🫢 No cap, that's the whole vibe.


🌸 NAME 🌸

usb4_usb3_port_allocated_bandwidth β€” the function that tells you the bandwidth allocated for USB3, iykyk πŸ’–


✨ SYNOPSIS ✨

int usb4_usb3_port_allocated_bandwidth (struct tb_port *port , int
*upstream_bw , int *downstream_bw );

πŸŽ€ ARGUMENTS πŸŽ€

  • port β€” the USB3 adapter port. this is the main character, the one we're interrogating πŸ‘€
  • upstream_bw β€” the allocated upstream bandwidth gets stored in here, bestie. it's an out-param, so it's giving "I'll fill you in" energy ✨
  • downstream_bw β€” same deal but for downstream bandwidth. that's where the downstream number goes πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

So what does it actually do? It stores the currently allocated USB3 bandwidth into upstream_bw and downstream_bw, and the units are Mb/s β€” megabit per second, periodt. πŸ”₯

That's it. That's the whole function. lowkey iconic for how straightforward it is πŸ’…


πŸ¦‹ RETURN πŸ¦‹

Returns 0 on success, and a negative errno otherwise. so like, check your return value, bestie β€” a negative number is the function telling you something went wrong, not me being dramatic 😭


πŸ‘‘ SEE ALSO πŸ‘‘

This lives in the kernel file ./drivers/thunderbolt/usb4.c, and honestly the whole squad shows up in the references, so here's everyone β€” no skips, no cuts, fr fr:


quick vibe check: this whole thing comes from ./drivers/thunderbolt and it's dated October 2026 β€” so yeah, future-coded of it 🌈 that's the sign-off bestie, go read your bandwidth numbers responsibly πŸ’œβœ¨πŸŽ€
πŸ“¦ where this page comes from