/linux-6.12.1/drivers/thunderbolt/ |
D | tunnel.c | 150 struct tb_tunnel *tunnel; in tb_tunnel_alloc() local 152 tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL); in tb_tunnel_alloc() 153 if (!tunnel) in tb_tunnel_alloc() 156 tunnel->paths = kcalloc(npaths, sizeof(tunnel->paths[0]), GFP_KERNEL); in tb_tunnel_alloc() 157 if (!tunnel->paths) { in tb_tunnel_alloc() 158 tb_tunnel_free(tunnel); in tb_tunnel_alloc() 162 INIT_LIST_HEAD(&tunnel->list); in tb_tunnel_alloc() 163 tunnel->tb = tb; in tb_tunnel_alloc() 164 tunnel->npaths = npaths; in tb_tunnel_alloc() 165 tunnel->type = type; in tb_tunnel_alloc() [all …]
|
D | tunnel.h | 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, [all …]
|
D | tb.c | 163 struct tb_tunnel *tunnel; in tb_discover_dp_resources() local 165 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_discover_dp_resources() 166 if (tb_tunnel_is_dp(tunnel)) in tb_discover_dp_resources() 167 tb_discover_dp_resource(tb, tunnel->dst_port); in tb_discover_dp_resources() 176 const struct tb_tunnel *tunnel; in tb_enable_clx() local 199 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_enable_clx() 200 if (tb_tunnel_is_dma(tunnel)) { in tb_enable_clx() 201 if (tb_tunnel_port_on_path(tunnel, tb_upstream_port(sw))) in tb_enable_clx() 271 static void tb_increase_tmu_accuracy(struct tb_tunnel *tunnel) in tb_increase_tmu_accuracy() argument 275 if (!tunnel) in tb_increase_tmu_accuracy() [all …]
|
D | test.c | 1393 struct tb_tunnel *tunnel; in tb_test_tunnel_dp() local 1409 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 1, 0, 0); in tb_test_tunnel_dp() 1410 KUNIT_ASSERT_NOT_NULL(test, tunnel); in tb_test_tunnel_dp() 1411 KUNIT_EXPECT_EQ(test, tunnel->type, TB_TUNNEL_DP); in tb_test_tunnel_dp() 1412 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, in); in tb_test_tunnel_dp() 1413 KUNIT_EXPECT_PTR_EQ(test, tunnel->dst_port, out); in tb_test_tunnel_dp() 1414 KUNIT_ASSERT_EQ(test, tunnel->npaths, 3); in tb_test_tunnel_dp() 1415 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 2); in tb_test_tunnel_dp() 1416 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp() 1417 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].out_port, out); in tb_test_tunnel_dp() [all …]
|
/linux-6.12.1/drivers/gpu/drm/display/ |
D | drm_dp_tunnel.c | 301 const char *drm_dp_tunnel_name(const struct drm_dp_tunnel *tunnel) in drm_dp_tunnel_name() argument 303 return tunnel->name; in drm_dp_tunnel_name() 364 tunnel_get(struct drm_dp_tunnel *tunnel) in tunnel_get() argument 366 kref_get(&tunnel->kref); in tunnel_get() 368 return tunnel; in tunnel_get() 373 struct drm_dp_tunnel *tunnel = container_of(kref, typeof(*tunnel), kref); in free_tunnel() local 374 struct drm_dp_tunnel_group *group = tunnel->group; in free_tunnel() 376 list_del(&tunnel->node); in free_tunnel() 380 kfree(tunnel); in free_tunnel() 383 static void tunnel_put(struct drm_dp_tunnel *tunnel) in tunnel_put() argument [all …]
|
/linux-6.12.1/include/drm/display/ |
D | drm_dp_tunnel.h | 24 struct drm_dp_tunnel *tunnel; member 31 drm_dp_tunnel_get(struct drm_dp_tunnel *tunnel, struct ref_tracker **tracker); 34 drm_dp_tunnel_put(struct drm_dp_tunnel *tunnel, struct ref_tracker **tracker); 36 static inline void drm_dp_tunnel_ref_get(struct drm_dp_tunnel *tunnel, in drm_dp_tunnel_ref_get() argument 39 tunnel_ref->tunnel = drm_dp_tunnel_get(tunnel, &tunnel_ref->tracker); in drm_dp_tunnel_ref_get() 44 drm_dp_tunnel_put(tunnel_ref->tunnel, &tunnel_ref->tracker); in drm_dp_tunnel_ref_put() 45 tunnel_ref->tunnel = NULL; in drm_dp_tunnel_ref_put() 51 int drm_dp_tunnel_destroy(struct drm_dp_tunnel *tunnel); 53 int drm_dp_tunnel_enable_bw_alloc(struct drm_dp_tunnel *tunnel); 54 int drm_dp_tunnel_disable_bw_alloc(struct drm_dp_tunnel *tunnel); [all …]
|
/linux-6.12.1/net/l2tp/ |
D | l2tp_core.c | 143 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument 145 struct sock *sk = tunnel->sock; in l2tp_tunnel_free() 147 trace_free_tunnel(tunnel); in l2tp_tunnel_free() 151 switch (tunnel->encap) { in l2tp_tunnel_free() 162 tunnel->sock = NULL; in l2tp_tunnel_free() 166 kfree_rcu(tunnel, rcu); in l2tp_tunnel_free() 172 if (session->tunnel) in l2tp_session_free() 173 l2tp_tunnel_put(session->tunnel); in l2tp_session_free() 181 struct l2tp_tunnel *tunnel; in l2tp_sk_to_tunnel() local 186 idr_for_each_entry_ul(&pn->l2tp_tunnel_idr, tunnel, tmp, tunnel_id) { in l2tp_sk_to_tunnel() [all …]
|
D | l2tp_debugfs.c | 39 struct l2tp_tunnel *tunnel; member 46 if (pd->tunnel) in l2tp_dfs_next_tunnel() 47 l2tp_tunnel_put(pd->tunnel); in l2tp_dfs_next_tunnel() 49 pd->tunnel = l2tp_tunnel_get_next(pd->net, &pd->tkey); in l2tp_dfs_next_tunnel() 59 pd->session = l2tp_session_get_next(pd->net, pd->tunnel->sock, in l2tp_dfs_next_session() 60 pd->tunnel->version, in l2tp_dfs_next_session() 61 pd->tunnel->tunnel_id, &pd->skey); in l2tp_dfs_next_session() 84 if (!pd->tunnel) in l2tp_dfs_seq_start() 90 if (!pd->tunnel && !pd->session) in l2tp_dfs_seq_start() 117 if (pd->tunnel) { in l2tp_dfs_seq_stop() [all …]
|
D | l2tp_ppp.c | 267 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local 280 tunnel = session->tunnel; in pppol2tp_sendmsg() 282 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg() 344 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local 355 tunnel = session->tunnel; in pppol2tp_xmit() 357 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit() 625 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument 629 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu() 640 struct l2tp_tunnel *tunnel; in pppol2tp_tunnel_get() local 645 tunnel = l2tp_tunnel_get(net, info->tunnel_id); in pppol2tp_tunnel_get() [all …]
|
D | l2tp_netlink.c | 38 int flags, struct l2tp_tunnel *tunnel, u8 cmd); 51 struct l2tp_tunnel *tunnel; in l2tp_nl_session_get() local 62 tunnel = l2tp_tunnel_get(net, tunnel_id); in l2tp_nl_session_get() 63 if (tunnel) { in l2tp_nl_session_get() 64 session = l2tp_session_get(net, tunnel->sock, tunnel->version, in l2tp_nl_session_get() 66 l2tp_tunnel_put(tunnel); in l2tp_nl_session_get() 105 struct l2tp_tunnel *tunnel, in l2tp_tunnel_notify() argument 116 NLM_F_ACK, tunnel, cmd); in l2tp_tunnel_notify() 193 struct l2tp_tunnel *tunnel; in l2tp_nl_cmd_tunnel_create() local 238 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create() [all …]
|
D | trace.h | 28 TP_PROTO(struct l2tp_tunnel *tunnel), 29 TP_ARGS(tunnel), 34 memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX); 52 TP_PROTO(struct l2tp_tunnel *tunnel), 53 TP_ARGS(tunnel), 63 memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX); 64 __entry->fd = tunnel->fd; 65 __entry->tid = tunnel->tunnel_id; 66 __entry->ptid = tunnel->peer_tunnel_id; 67 __entry->version = tunnel->version; [all …]
|
D | l2tp_core.h | 71 struct l2tp_tunnel *tunnel; /* back pointer to tunnel context */ member 194 int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel, 212 void l2tp_tunnel_put(struct l2tp_tunnel *tunnel); 238 int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, 240 void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel); 243 struct l2tp_tunnel *tunnel, 247 struct l2tp_tunnel *tunnel); 287 static inline u32 l2tp_tunnel_dst_mtu(const struct l2tp_tunnel *tunnel) in l2tp_tunnel_dst_mtu() argument 292 dst = sk_dst_get(tunnel->sock); in l2tp_tunnel_dst_mtu() 303 static inline bool l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel) in l2tp_tunnel_uses_xfrm() argument [all …]
|
D | l2tp_eth.c | 185 static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel, in l2tp_eth_adjust_mtu() argument 194 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_eth_adjust_mtu() 199 lock_sock(tunnel->sock); in l2tp_eth_adjust_mtu() 200 l3_overhead = kernel_sock_ip_overhead(tunnel->sock); in l2tp_eth_adjust_mtu() 201 release_sock(tunnel->sock); in l2tp_eth_adjust_mtu() 216 mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead; in l2tp_eth_adjust_mtu() 225 static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, in l2tp_eth_create() argument 245 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, in l2tp_eth_create() 262 l2tp_eth_adjust_mtu(tunnel, session, dev); in l2tp_eth_create() 282 rc = l2tp_session_register(session, tunnel); in l2tp_eth_create()
|
/linux-6.12.1/drivers/gpu/drm/i915/display/ |
D | intel_dp_tunnel.c | 32 drm_dp_tunnel_destroy(intel_dp->tunnel); in intel_dp_tunnel_disconnect() 33 intel_dp->tunnel = NULL; in intel_dp_tunnel_disconnect() 47 drm_dp_tunnel_disable_bw_alloc(intel_dp->tunnel); in intel_dp_tunnel_destroy() 82 ret = drm_dp_tunnel_update_state(intel_dp->tunnel); in update_tunnel_state() 86 drm_dp_tunnel_name(intel_dp->tunnel), in update_tunnel_state() 94 !drm_dp_tunnel_bw_alloc_is_enabled(intel_dp->tunnel)) in update_tunnel_state() 108 drm_dp_tunnel_name(intel_dp->tunnel), in update_tunnel_state() 139 drm_dp_tunnel_name(intel_dp->tunnel), in allocate_initial_tunnel_bw_for_pipes() 146 err = drm_dp_tunnel_alloc_bw(intel_dp->tunnel, tunnel_bw); in allocate_initial_tunnel_bw_for_pipes() 150 drm_dp_tunnel_name(intel_dp->tunnel), in allocate_initial_tunnel_bw_for_pipes() [all …]
|
/linux-6.12.1/drivers/net/ |
D | amt.c | 121 static u32 amt_source_hash(struct amt_tunnel_list *tunnel, union amt_addr *src) in amt_source_hash() argument 123 u32 hash = jhash(src, sizeof(*src), tunnel->amt->hash_seed); in amt_source_hash() 125 return reciprocal_scale(hash, tunnel->amt->hash_buckets); in amt_source_hash() 182 static struct amt_source_node *amt_lookup_src(struct amt_tunnel_list *tunnel, in amt_lookup_src() argument 187 u32 hash = amt_source_hash(tunnel, src); in amt_lookup_src() 198 static u32 amt_group_hash(struct amt_tunnel_list *tunnel, union amt_addr *group) in amt_group_hash() argument 200 u32 hash = jhash(group, sizeof(*group), tunnel->amt->hash_seed); in amt_group_hash() 202 return reciprocal_scale(hash, tunnel->amt->hash_buckets); in amt_group_hash() 205 static struct amt_group_node *amt_lookup_group(struct amt_tunnel_list *tunnel, in amt_lookup_group() argument 210 u32 hash = amt_group_hash(tunnel, group); in amt_lookup_group() [all …]
|
/linux-6.12.1/net/ipv4/ |
D | ip_tunnel.c | 237 struct ip_tunnel *tunnel; in __ip_tunnel_create() local 263 tunnel = netdev_priv(dev); in __ip_tunnel_create() 264 tunnel->parms = *parms; in __ip_tunnel_create() 265 tunnel->net = net; in __ip_tunnel_create() 282 struct ip_tunnel *tunnel = netdev_priv(dev); in ip_tunnel_bind_dev() local 286 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev() 288 iph = &tunnel->parms.iph; in ip_tunnel_bind_dev() 296 iph->saddr, tunnel->parms.o_key, in ip_tunnel_bind_dev() 298 tunnel->parms.link, tunnel->fwmark, 0, 0); in ip_tunnel_bind_dev() 299 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_bind_dev() [all …]
|
D | ip_gre.c | 271 struct ip_tunnel *tunnel; in erspan_rcv() local 284 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in erspan_rcv() 295 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in erspan_rcv() 299 if (tunnel) { in erspan_rcv() 314 if (tunnel->collect_md) { in erspan_rcv() 350 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv() 365 struct ip_tunnel *tunnel; in __ipgre_rcv() local 368 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv() 371 if (tunnel) { in __ipgre_rcv() 381 if (tunnel->dev->header_ops == &ipgre_header_ops) in __ipgre_rcv() [all …]
|
D | ipip.c | 221 struct ip_tunnel *tunnel; in ipip_tunnel_rcv() local 227 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, iph->saddr, in ipip_tunnel_rcv() 229 if (tunnel) { in ipip_tunnel_rcv() 232 if (tunnel->parms.iph.protocol != ipproto && in ipip_tunnel_rcv() 233 tunnel->parms.iph.protocol != 0) in ipip_tunnel_rcv() 246 if (tunnel->collect_md) { in ipip_tunnel_rcv() 256 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv() 285 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip_tunnel_xmit() local 286 const struct iphdr *tiph = &tunnel->parms.iph; in ipip_tunnel_xmit() 313 if (tunnel->collect_md) in ipip_tunnel_xmit() [all …]
|
D | ip_vti.c | 50 struct ip_tunnel *tunnel; in vti_input() local 58 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in vti_input() 60 if (tunnel) { in vti_input() 64 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; in vti_input() 67 skb->dev = tunnel->dev; in vti_input() 103 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local 107 if (!tunnel) in vti_rcv_cb() 110 dev = tunnel->dev; in vti_rcv_cb() 134 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb() 141 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); in vti_rcv_cb() [all …]
|
/linux-6.12.1/net/ipv6/ |
D | sit.c | 72 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, 514 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local 515 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit() 520 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit() 521 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit() 523 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit() 524 netdev_put(dev, &tunnel->dev_tracker); in ipip6_tunnel_uninit() 605 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument 609 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd() 626 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument [all …]
|
D | ip6_gre.c | 491 struct ip6_tnl *tunnel; in ip6gre_rcv() local 494 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6gre_rcv() 497 if (tunnel) { in ip6gre_rcv() 498 if (tunnel->parms.collect_md) { in ip6gre_rcv() 510 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv() 512 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv() 528 struct ip6_tnl *tunnel; in ip6erspan_rcv() local 538 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv() 541 if (tunnel) { in ip6erspan_rcv() 552 if (tunnel->parms.collect_md) { in ip6erspan_rcv() [all …]
|
/linux-6.12.1/Documentation/networking/ |
D | l2tp.rst | 27 An L2TP tunnel carries one or more L2TP sessions. Each tunnel is 30 to/from L2TP. Fields in the L2TP header identify the tunnel or session 40 1) Create a tunnel socket. Exchange L2TP control protocol messages 41 with the peer over that socket in order to establish a tunnel. 43 2) Create a tunnel context in the kernel, using information 47 tunnel socket in order to establish a session. 62 To create a tunnel socket for use by L2TP, the standard POSIX 65 For example, for a tunnel using IPv4 addresses and UDP encapsulation:: 69 Or for a tunnel using IPv6 addresses and IP encapsulation:: 78 `include/uapi/linux/l2tp.h`_. The address includes the L2TP tunnel [all …]
|
D | bareudp.rst | 11 The Bareudp tunnel module provides a generic L3 encapsulation support for 12 tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel. 30 This creates a bareudp tunnel device which tunnels L3 traffic with ethertype 44 For an IPv4 tunnel the multiproto mode allows the tunnel to also handle 49 For MPLS, the multiproto mode allows the tunnel to handle both unicast 55 The OVS or TC flower layer must set the tunnel information in SKB dst field before 57 bareudp device extracts and stores the tunnel information in SKB dst field before
|
/linux-6.12.1/tools/testing/selftests/bpf/ |
D | with_tunnels.sh | 15 ip tunnel show 24 ip tunnel del "ipip_${SUFFIX}" 25 ip tunnel del "gre_${SUFFIX}" 26 ip tunnel del "sit_${SUFFIX}" 29 ip tunnel show
|
/linux-6.12.1/tools/testing/selftests/net/ |
D | vrf-xfrm-tests.sh | 218 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel 223 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel 228 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel 233 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel 239 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel 244 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel 249 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel 254 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel 260 proto esp spi ${SPI_1} reqid 0 mode tunnel \ 267 proto esp spi ${SPI_1} reqid 0 mode tunnel \ [all …]
|