tb_consumed_dp_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tb_consumed_dp_bandwidth(9) πŸ’…

okay so this is a page from the Kernel API Manual and it's all about tb_consumed_dp_bandwidth β€” the function that tells you how much DisplayPort bandwidth a single link is already eating up. bestie, let's get into it πŸŽ€


✨ NAME ✨

tb_consumed_dp_bandwidth β€” consumed DP bandwidth over a single link πŸ’–


🌸 SYNOPSIS 🌸

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

πŸ¦‹ ARGUMENTS πŸ¦‹

  • tb β€” the domain structure, like, the whole vibe container for this Thunderbolt domain πŸ‘‘
  • src_port β€” source protocol adapter, where the traffic starts its little journey
  • dst_port β€” destination protocol adapter, where it's headed 🫢
  • port β€” the USB4 port that the consumed bandwidth is calculated for, this is the main character of the calculation ✨
  • consumed_up β€” consumed upstream bandwidth, in Mb/s ⬆️
  • consumed_down β€” consumed downstream bandwidth, in Mb/s ⬇️

πŸ’œ DESCRIPTION πŸ’œ

So what it actually does: it calculates the consumed DP bandwidth at port between the path from src_port to dst_port. literally the math of "how much of this link is already spoken for" πŸ”₯

🚨 important caveat, do not skip: it does not take tunnel starting from src_port and ending from src_port into account. yeah, src to src β€” that's what the original says, iykyk, no cap πŸ™ˆ

and if there's bandwidth reserved for any of the groups between src_port and dst_port (but not yet used πŸ‘€) then that reserved-but-unused bandwidth is also taken into account in the returned consumed bandwidth. so it's not just what's flowing right now, it's what's been claimed. ate πŸ’…


⭐ RETURN ⭐

0 on success πŸŽ‰ β€” negative errno otherwise 😭


🌈 SEE ALSO 🌈

go read those next, bestie, they're all in the same friend group 🧚


πŸ’€ tiny reminder: this whole thing lives in ./drivers/thunderbolt, dated October 2026. slay, thanks for coming to my TED talk, ily, bye πŸ’–πŸŒΈβœ¨
πŸ“¦ where this page comes from