tb_tunnel_discover_dp(9)
β¨ tb_tunnel_discover_dp(9) β¨
okay so bestie, welcome to the Kernel API Manual for tb_tunnel_discover_dp(9) β yes that's the whole title, yes it's a mouthful, no we're not changing it π
this is the Thunderbolt tunnel girlies' page and it's lowkey iconic.
π¦ NAME π¦
tb_tunnel_discover_dp β the little function that goes and discovers the Display Port tunnels that already exist πβ¨ like it's not making new ones, it's just finding the ones already vibing there.
π SYNOPSIS π
struct tb_tunnel * tb_tunnel_discover_dp (struct tb *tb , struct tb_port
*in , bool alloc_hopid , void (*callback)(struct tb_tunnel *, void *) ,
void *callback_data );
that's the whole signature, copied exactly, do not come for me π«Ά
πΈ ARGUMENTS πΈ
tbβ pointer to the domain structure π the whole neighborhood basically.inβ the DP in adapter π the starting point of the adventure.alloc_hopidβ abool; if true, allocate HopIDs from the visited ports β¨ (HopIDs from the ports it visited, specifically β not from anywhere, don't get it twisted).callbackβ the callback that gets called when the DP tunnel is fully activated π₯ (or when there's an error π β yes, errors count too, it still calls you back).callback_dataβ the data that gets passed to that callback π your little gift bag of context.
π DESCRIPTION π
so here's the vibe: if the in adapter is active, this function follows the tunnel all the way to the DP out adapter β and then back ππ¦ like a little round trip, a there-and-back-again situation.
It returns the discovered tunnel, or NULL if there was no tunnel at all π (which, honestly, valid β sometimes the tunnel just isn't there).
And for how the callback works? See tb_tunnel_alloc_dp. that's where the callback lore lives, iykyk π
β RETURN β
Pointer to struct tb_tunnel β or NULL if no tunnel was found π that's it, that's the return.
π SEE ALSO π
the manpage says go read these, and honestly? main character reading list π:
Kernel file ./drivers/thunderbolt/tunnel.c, plus:
tb_available_credits(9)tb_tunnel_event(9)tb_tunnel_discover_pci(9)tb_tunnel_alloc_pci(9)tb_tunnel_reserved_pci(9)tb_dp_bandwidth_mode_maximum_bandwidth(9)tb_tunnel_alloc_dp(9)tb_tunnel_alloc_dma(9)tb_tunnel_match_dma(9)tb_tunnel_discover_usb3(9)tb_tunnel_alloc_usb3(9)tb_tunnel_is_invalid(9)tb_tunnel_activate(9)tb_tunnel_deactivate(9)tb_tunnel_port_on_path(9)tb_tunnel_maximum_bandwidth(9)tb_tunnel_allocated_bandwidth(9)tb_tunnel_alloc_bandwidth(9)tb_tunnel_consumed_bandwidth(9)tb_tunnel_release_unused_bandwidth(9)tb_tunnel_reclaim_available_bandwidth(9)
and that's the page fr fr π«Ά this whole thing lives in ./drivers/thunderbolt and it's dated October 2026 β so yeah, future-coded manual page, we love to see it β¨π bye bestie! π
π¦ 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