tb_consumed...ie_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ tb_consumed...ie_bandwidth(9) πŸ¦‹

okay so bestie, you found it β€” a page straight outta the Kernel API Manual (that's the vibe, that's the whole manual, and yes we're doing this πŸ’–). This one's about tb_consumed_usb3_pcie_bandwidth, which ngl has a name longer than my attention span but it's actually iconic once you get it. Sit down, hydrate, let's go 🫢


✨ NAME ✨

tb_consumed_usb3_pcie_bandwidth β€” it's the function that tells you how much USB3/PCIe bandwidth is being consumed over a single link. that's the whole assignment. πŸ’…


🌈 SYNOPSIS 🌈

int tb_consumed_usb3_pcie_bandwidth (struct tb *tb , struct tb_port
*src_port , struct tb_port *dst_port , struct tb_port *port , int
*consumed_up , int *consumed_down );

literally copy that exactly, don't be cute with it 😭


πŸŽ€ ARGUMENTS πŸŽ€

so these are the little guys you're feeding in, one by one:

  • tb β€” the domain structure. the big picture, the main character energy of the whole thing πŸ‘‘
  • src_port β€” the source protocol adapter. where the journey starts ✨
  • dst_port β€” the destination protocol adapter. where it's headed πŸ¦‹
  • port β€” the USB4 port where the consumed bandwidth gets calculated. this is the spot we're doing math on πŸ“
  • consumed_up β€” the consumed upstream bandwidth, measured in Mb/s ⬆️
  • consumed_down β€” the consumed downstream bandwidth, also in Mb/s ⬇️
note the units, bestie: Mb/s both times. not MB/s, not vibes/s. πŸ’€

πŸ’œ DESCRIPTION πŸ’œ

okay so what this actually does: it calculates the consumed USB3 and PCIe bandwidth at port, between the path going from src_port to dst_port. cute, tidy, does one thing 🧚

but here's the lowkey important bit β€” it does not take a USB3 tunnel that starts at src_port and ends on src_port into account. why? because that bandwidth is already included as part of the "first hop" USB3 tunnel. so it's not being shady or forgetting, it's literally already counted. iykyk 🌸

fr fr, don't go counting it twice. that's the trap. πŸ™ˆ

⭐ RETURN ⭐

  • 0 on success β€” slay, we ate πŸ”₯
  • a negative errno otherwise β€” not slay, but honest 😭

πŸ‘‘ SEE ALSO πŸ‘‘

go off and read these next, bestie, they're all in the same friend group:


and that's the page!! πŸŽ€ all of it lives over in ./drivers/thunderbolt, and this edition is stamped October 2026 β€” so like, mark your calendar or whatever πŸ’– bye bestie, go calculate some bandwidth responsibly πŸ¦‹πŸ’…

πŸ“¦ where this page comes from