STRUCT TB_PATH_HOP(9)
π
struct tb_path_hop(9) β sheβs from the Kernel API Manual, bestie β¨
Okay so this is the manual page for struct tb_path_hop, and itβs literally all about routing information for a tb_path. Iconic little routing struct, no cap π
π NAME π
struct tb_path_hop β routing information for a tb_path π¦
β¨ SYNOPSIS β¨
struct tb_path_hop {
struct tb_port *in_port;
struct tb_port *out_port;
int in_hop_index;
int in_counter_index;
int next_hop_index;
unsigned int initial_credits;
unsigned int nfc_credits;
bool pm_support;
};
π«Ά Members π«Ά
in_portβ ingress port of a switch, bestie πout_portβ egress port of a switch where the packet is routed out; it must be on the same switch asin_portπin_hop_indexβ theHopIDwhere the path configuration entry is placed in the path config space ofin_portβ¨in_counter_indexβ the used counter index; not used in the driver currently, and-1disables it πnext_hop_indexβ theHopIDof the packet when it is routed out fromout_portπ¦initial_creditsβ number of initial flow control credits allocated for the path π«nfc_creditsβ number of non-flow controlled buffers allocated for thein_portπΈpm_supportβ set the path PM packet support bit to1; this is for USB4 v2 routers π₯
π Description π
Hop configuration is always done on the IN port of a switch, periodt. in_port and out_port have to be on the same switch β no sneaky cross-switch glow-ups here π
Packets arriving on in_port with "hop" = in_hop_index get routed through out_port. The next hop to take on out_port->remote is determined by next_hop_index. When routing a packet to another switch (out->remote is set), next_hop_index must match the in_hop_index of that next hop, or routing literally cannot happen π
in_counter_index is the index of a counter (in TB_CFG_COUNTERS) on the in port. Lowkey important to know π«Ά
π SEE ALSO π
Kernel file ./drivers/thunderbolt/tb.h plus 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), 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_for_each_upstream_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), and struct usb4_port_margining_params(9) πβ
Cute little sign-off: this page lives under ./drivers/thunderbolt, itβs dated October 2026, and itβs serving struct tb_path_hop(9) realness ππ
π¦ 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