Lines Matching full:tunnel
22 * struct tb_tunnel - Tunnel between two ports
24 * @src_port: Source port of the tunnel
25 * @dst_port: Destination port of the tunnel. For discovered incomplete
27 * @paths: All paths required by the tunnel
29 * @init: Optional tunnel specific initialization
30 * @deinit: Optional tunnel specific de-initialization
31 * @activate: Optional tunnel specific activation/deactivation
32 * @maximum_bandwidth: Returns maximum possible bandwidth for this tunnel
33 * @allocated_bandwidth: Return how much bandwidth is allocated for the tunnel
34 * @alloc_bandwidth: Change tunnel bandwidth allocation
35 * @consumed_bandwidth: Return how much bandwidth the tunnel consumes
39 * @type: Type of the tunnel
40 * @max_up: Maximum upstream bandwidth (Mb/s) available for the tunnel.
42 * @max_down: Maximum downstream bandwidth (Mb/s) available for the tunnel.
55 int (*init)(struct tb_tunnel *tunnel);
56 void (*deinit)(struct tb_tunnel *tunnel);
57 int (*activate)(struct tb_tunnel *tunnel, bool activate);
58 int (*maximum_bandwidth)(struct tb_tunnel *tunnel, int *max_up,
60 int (*allocated_bandwidth)(struct tb_tunnel *tunnel, int *allocated_up,
62 int (*alloc_bandwidth)(struct tb_tunnel *tunnel, int *alloc_up,
64 int (*consumed_bandwidth)(struct tb_tunnel *tunnel, int *consumed_up,
66 int (*release_unused_bandwidth)(struct tb_tunnel *tunnel);
67 void (*reclaim_available_bandwidth)(struct tb_tunnel *tunnel,
94 bool tb_tunnel_match_dma(const struct tb_tunnel *tunnel, int transmit_path,
102 void tb_tunnel_free(struct tb_tunnel *tunnel);
103 int tb_tunnel_activate(struct tb_tunnel *tunnel);
104 int tb_tunnel_restart(struct tb_tunnel *tunnel);
105 void tb_tunnel_deactivate(struct tb_tunnel *tunnel);
106 bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel);
107 bool tb_tunnel_port_on_path(const struct tb_tunnel *tunnel,
109 int tb_tunnel_maximum_bandwidth(struct tb_tunnel *tunnel, int *max_up,
111 int tb_tunnel_allocated_bandwidth(struct tb_tunnel *tunnel, int *allocated_up,
113 int tb_tunnel_alloc_bandwidth(struct tb_tunnel *tunnel, int *alloc_up,
115 int tb_tunnel_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up,
117 int tb_tunnel_release_unused_bandwidth(struct tb_tunnel *tunnel);
118 void tb_tunnel_reclaim_available_bandwidth(struct tb_tunnel *tunnel,
122 static inline bool tb_tunnel_is_pci(const struct tb_tunnel *tunnel) in tb_tunnel_is_pci() argument
124 return tunnel->type == TB_TUNNEL_PCI; in tb_tunnel_is_pci()
127 static inline bool tb_tunnel_is_dp(const struct tb_tunnel *tunnel) in tb_tunnel_is_dp() argument
129 return tunnel->type == TB_TUNNEL_DP; in tb_tunnel_is_dp()
132 static inline bool tb_tunnel_is_dma(const struct tb_tunnel *tunnel) in tb_tunnel_is_dma() argument
134 return tunnel->type == TB_TUNNEL_DMA; in tb_tunnel_is_dma()
137 static inline bool tb_tunnel_is_usb3(const struct tb_tunnel *tunnel) in tb_tunnel_is_usb3() argument
139 return tunnel->type == TB_TUNNEL_USB3; in tb_tunnel_is_usb3()
142 static inline bool tb_tunnel_direction_downstream(const struct tb_tunnel *tunnel) in tb_tunnel_direction_downstream() argument
144 return tb_port_path_direction_downstream(tunnel->src_port, in tb_tunnel_direction_downstream()
145 tunnel->dst_port); in tb_tunnel_direction_downstream()
148 const char *tb_tunnel_type_name(const struct tb_tunnel *tunnel);
150 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ argument
152 struct tb_tunnel *__tunnel = (tunnel); \
162 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ argument
163 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg)
164 #define tb_tunnel_warn(tunnel, fmt, arg...) \ argument
165 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg)
166 #define tb_tunnel_info(tunnel, fmt, arg...) \ argument
167 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
168 #define tb_tunnel_dbg(tunnel, fmt, arg...) \ argument
169 __TB_TUNNEL_PRINT(tb_dbg, tunnel, fmt, ##arg)