tb_consumed...ie_bandwidth(9)
π¦ 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 β
0on success β slay, we ate π₯- a negative
errnootherwise β not slay, but honest π
π SEE ALSO π
go off and read these next, bestie, they're all in the same friend group:
- Kernel file
./drivers/thunderbolt/tb.cstruct tb_cm(9) tb_consumed_dp_bandwidth(9)tb_maximum_bandwidth(9)tb_available_bandwidth(9)tb_configure_asym(9)tb_configure_sym(9)
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
- 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