tb_for_each...port_on_path(9)
π¦ tb_for_each...port_on_path(9) β Kernel API Manual π¦
okay bestie, welcome to the Kernel API Manual page for tb_for_each_upstream_port_on_path(9) β yes the title up top is abbreviated because the full name is kinda long, but that's fine, we move π
β¨ NAME β¨
tb_for_each_upstream_port_on_path β literally just iterate over each upstream port on a path π«Ά
π SYNOPSIS π
tb_for_each_upstream_port_on_path (src , dst , p );
no cap, that's the whole signature. keep the spaces exactly as they are, she's quirky like that π
πΈ ARGUMENTS πΈ
srcβ the source port, like where the journey starts πdstβ the destination port, the final boss destination πpβ the port that gets used as the iterator, aka the little loop variable doing all the walking πΆββοΈ
π DESCRIPTION π
So the way that this works is: it walks over each upstream lane adapter on the path from src to dst. that's it. that's the vibe. every upstream lane adapter along the way gets a visit, one at a time, and p is the main character holding your current spot in the iteration β¨
lowkey iconic macro energy β it's giving "for loop but with lore" π
π SEE ALSO π
the whole friend group, in order, no one left out fr fr:
./drivers/thunderbolt/tb.hβ the kernel file herself πstruct tb_nvm(9)enum tb_switch_tmu_mode(9)struct tb_switch_tmu(9)struct tb_switch(9)struct tb_bandwidth_group(9)struct tb_port(9)struct usb4_port(9)struct tb_retimer(9)struct tb_path_hop(9)enum tb_path_port(9)struct tb_path(9)struct tb_cm_ops(9)tb_upstream_port(9)tb_is_upstream_port(9)tb_port_has_remote(9)tb_domain_event(9)tb_switch_for_each_port(9)tb_switch_downstream_port(9)tb_switch_depth(9)tb_switch_is_icm(9)tb_switch_tmu_is_configured(9)tb_switch_tmu_is_enabled(9)tb_switch_clx_is_enabled(9)tb_port_path_direction_downstream(9)tb_for_each_port_on_path(9)tb_path_for_each_hop(9)tb_downstream_route(9)tb_xdomain_downstream_port(9)usb4_switch_version(9)tb_switch_is_usb4(9)enum usb4_sb_target(9)enum usb4_margin_sw_error_counter(9)struct usb4_port_margining_params(9)
that's the whole page bestie, go forth and iterate π§
sign-off szn: this lil masterpiece lives in ./drivers/thunderbolt, dated October 2026, and it's page tb_for_each...port_on_path(9) of your fave manual. mwah π β
π¦ 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