tb_tunnel_alloc_pci(9)
π NAME π
okay bestie, meet tb_tunnel_alloc_pci(9) from the Kernel API Manual β the function that does exactly what it says on the tin: tb_tunnel_alloc_pci will allocate a pci tunnel. no cap, sheβs the tunnel-booking bestie for PCI. π
β¨ SYNOPSIS β¨
the signature is giving βI know my types,β and here it is verbatim so you can copy-paste like a main character:
struct tb_tunnel * tb_tunnel_alloc_pci (struct tb *tb , struct tb_port
*up , struct tb_port *down );
π«Ά ARGUMENTS π«Ά
tbβ pointer to the domain structure. literally the domain context, bestie.upβ PCIe upstream adapter port. the upward queen. πΈdownβ PCIe downstream adapter port. the downward queen. π¦
πΈ DESCRIPTION πΈ
Allocate a PCI tunnel. The way this works is the ports have to be the right vibe: they must be of type TB_TYPE_PCIE_UP and TB_TYPE_PCIE_DOWN. thatβs the requirement, iykyk. β¨
bestie, those port types are mandatory β donβt try to make fetch happen with other types. π
π RETURN π
Pointer to struct tb_tunnel β or NULL on failure. so if it comes back NULL, thatβs the fail-girl moment. π
π SEE ALSO π
Kernel file ./drivers/thunderbolt/tunnel.c is the home base. and hereβs the whole friend group, in order:
tb_available_credits(9)tb_tunnel_event(9)tb_tunnel_discover_pci(9)tb_tunnel_reserved_pci(9)tb_dp_bandwidth_mode_maximum_bandwidth(9)tb_tunnel_discover_dp(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)
signed off with a sparkle from the ./drivers/thunderbolt source/version corner, stamped October 2026, page tb_tunnel_alloc_pci(9) β 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