/Linux-v5.4/drivers/thunderbolt/ |
D | tunnel.c | 35 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ argument 37 struct tb_tunnel *__tunnel = (tunnel); \ 47 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ argument 48 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg) 49 #define tb_tunnel_warn(tunnel, fmt, arg...) \ argument 50 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg) 51 #define tb_tunnel_info(tunnel, fmt, arg...) \ argument 52 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg) 53 #define tb_tunnel_dbg(tunnel, fmt, arg...) \ argument 54 __TB_TUNNEL_PRINT(tb_dbg, tunnel, fmt, ##arg) [all …]
|
D | tunnel.h | 39 int (*init)(struct tb_tunnel *tunnel); 40 int (*activate)(struct tb_tunnel *tunnel, bool activate); 56 void tb_tunnel_free(struct tb_tunnel *tunnel); 57 int tb_tunnel_activate(struct tb_tunnel *tunnel); 58 int tb_tunnel_restart(struct tb_tunnel *tunnel); 59 void tb_tunnel_deactivate(struct tb_tunnel *tunnel); 60 bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel); 62 static inline bool tb_tunnel_is_pci(const struct tb_tunnel *tunnel) in tb_tunnel_is_pci() argument 64 return tunnel->type == TB_TUNNEL_PCI; in tb_tunnel_is_pci() 67 static inline bool tb_tunnel_is_dp(const struct tb_tunnel *tunnel) in tb_tunnel_is_dp() argument [all …]
|
D | tb.c | 67 struct tb_tunnel *tunnel = NULL; in tb_discover_tunnels() local 72 tunnel = tb_tunnel_discover_dp(tb, port); in tb_discover_tunnels() 76 tunnel = tb_tunnel_discover_pci(tb, port); in tb_discover_tunnels() 83 if (!tunnel) in tb_discover_tunnels() 86 if (tb_tunnel_is_pci(tunnel)) { in tb_discover_tunnels() 87 struct tb_switch *parent = tunnel->dst_port->sw; in tb_discover_tunnels() 89 while (parent != tunnel->src_port->sw) { in tb_discover_tunnels() 95 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_discover_tunnels() 227 struct tb_tunnel *tunnel; in tb_free_tunnel() local 229 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_free_tunnel() [all …]
|
/Linux-v5.4/net/l2tp/ |
D | l2tp_core.c | 149 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) in l2tp_session_id_hash() argument 151 return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)]; in l2tp_session_id_hash() 154 void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument 156 sock_put(tunnel->sock); in l2tp_tunnel_free() 165 struct l2tp_tunnel *tunnel; in l2tp_tunnel_get() local 168 list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) { in l2tp_tunnel_get() 169 if (tunnel->tunnel_id == tunnel_id && in l2tp_tunnel_get() 170 refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_tunnel_get() 173 return tunnel; in l2tp_tunnel_get() 185 struct l2tp_tunnel *tunnel; in l2tp_tunnel_get_nth() local [all …]
|
D | l2tp_debugfs.c | 39 struct l2tp_tunnel *tunnel; member 46 if (pd->tunnel) in l2tp_dfs_next_tunnel() 47 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_next_tunnel() 49 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx); in l2tp_dfs_next_tunnel() 59 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx); in l2tp_dfs_next_session() 80 if (pd->tunnel == NULL) in l2tp_dfs_seq_start() 86 if ((pd->tunnel == NULL) && (pd->session == NULL)) in l2tp_dfs_seq_start() 114 if (pd->tunnel) { in l2tp_dfs_seq_stop() 115 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_seq_stop() 116 pd->tunnel = NULL; in l2tp_dfs_seq_stop() [all …]
|
D | l2tp_ppp.c | 279 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local 292 tunnel = session->tunnel; in pppol2tp_sendmsg() 294 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg() 356 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local 367 tunnel = session->tunnel; in pppol2tp_xmit() 369 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit() 648 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument 652 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu() 668 struct l2tp_tunnel *tunnel; in pppol2tp_connect() local 698 tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id); in pppol2tp_connect() [all …]
|
D | l2tp_netlink.c | 40 int flags, struct l2tp_tunnel *tunnel, u8 cmd); 53 struct l2tp_tunnel *tunnel; in l2tp_nl_session_get() local 64 tunnel = l2tp_tunnel_get(net, tunnel_id); in l2tp_nl_session_get() 65 if (tunnel) { in l2tp_nl_session_get() 66 session = l2tp_tunnel_get_session(tunnel, session_id); in l2tp_nl_session_get() 67 l2tp_tunnel_dec_refcount(tunnel); in l2tp_nl_session_get() 106 struct l2tp_tunnel *tunnel, in l2tp_tunnel_notify() argument 117 NLM_F_ACK, tunnel, cmd); in l2tp_tunnel_notify() 168 struct l2tp_tunnel *tunnel; in l2tp_nl_cmd_tunnel_create() local 241 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create() [all …]
|
D | l2tp_core.h | 76 struct l2tp_tunnel *tunnel; /* back pointer to tunnel member 181 int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel, 194 struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel, 197 void l2tp_tunnel_free(struct l2tp_tunnel *tunnel); 200 struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth); 207 int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, 210 void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel); 212 struct l2tp_tunnel *tunnel, 216 struct l2tp_tunnel *tunnel); 235 static inline void l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel) in l2tp_tunnel_inc_refcount() argument [all …]
|
D | l2tp_eth.c | 217 static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel, in l2tp_eth_adjust_mtu() argument 226 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_eth_adjust_mtu() 231 lock_sock(tunnel->sock); in l2tp_eth_adjust_mtu() 232 l3_overhead = kernel_sock_ip_overhead(tunnel->sock); in l2tp_eth_adjust_mtu() 233 release_sock(tunnel->sock); in l2tp_eth_adjust_mtu() 248 mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead; in l2tp_eth_adjust_mtu() 257 static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, in l2tp_eth_create() argument 277 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, in l2tp_eth_create() 294 l2tp_eth_adjust_mtu(tunnel, session, dev); in l2tp_eth_create() 314 rc = l2tp_session_register(session, tunnel); in l2tp_eth_create()
|
D | l2tp_ip.c | 121 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip_recv() local 147 tunnel = session->tunnel; in l2tp_ip_recv() 148 if (!tunnel) in l2tp_ip_recv() 152 if (tunnel->debug & L2TP_MSG_DATA) { in l2tp_ip_recv() 160 pr_debug("%s: ip recv\n", tunnel->name); in l2tp_ip_recv() 236 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_ip_destroy_sock() local 241 if (tunnel) in l2tp_ip_destroy_sock() 242 l2tp_tunnel_delete(tunnel); in l2tp_ip_destroy_sock()
|
D | Kconfig | 20 L2TP is often used to tunnel PPP traffic over IP 21 tunnels. One IP tunnel may carry thousands of individual PPP 30 userland daemon handles L2TP the control protocol (tunnel 68 tunnel raw ethernet frames using L2TP, say Y here. If 80 userspace L2TPv3 daemons may create L2TP/IP tunnel sockets
|
D | l2tp_ip6.c | 134 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip6_recv() local 160 tunnel = session->tunnel; in l2tp_ip6_recv() 161 if (!tunnel) in l2tp_ip6_recv() 165 if (tunnel->debug & L2TP_MSG_DATA) { in l2tp_ip6_recv() 173 pr_debug("%s: ip recv\n", tunnel->name); in l2tp_ip6_recv() 249 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_ip6_destroy_sock() local 255 if (tunnel) in l2tp_ip6_destroy_sock() 256 l2tp_tunnel_delete(tunnel); in l2tp_ip6_destroy_sock()
|
/Linux-v5.4/net/ipv4/ |
D | ip_tunnel.c | 239 struct ip_tunnel *tunnel; in __ip_tunnel_create() local 265 tunnel = netdev_priv(dev); in __ip_tunnel_create() 266 tunnel->parms = *parms; in __ip_tunnel_create() 267 tunnel->net = net; in __ip_tunnel_create() 284 struct ip_tunnel *tunnel = netdev_priv(dev); in ip_tunnel_bind_dev() local 288 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev() 290 iph = &tunnel->parms.iph; in ip_tunnel_bind_dev() 298 iph->saddr, tunnel->parms.o_key, in ip_tunnel_bind_dev() 299 RT_TOS(iph->tos), tunnel->parms.link, in ip_tunnel_bind_dev() 300 tunnel->fwmark, 0); in ip_tunnel_bind_dev() [all …]
|
D | ip_gre.c | 258 struct ip_tunnel *tunnel; in erspan_rcv() local 270 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv() 274 if (tunnel) { in erspan_rcv() 285 if (tunnel->collect_md) { in erspan_rcv() 321 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv() 336 struct ip_tunnel *tunnel; in __ipgre_rcv() local 339 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv() 342 if (tunnel) { in __ipgre_rcv() 347 if (tunnel->dev->type != ARPHRD_NONE) in __ipgre_rcv() 351 if (tunnel->collect_md) { in __ipgre_rcv() [all …]
|
D | ip_vti.c | 50 struct ip_tunnel *tunnel; in vti_input() local 55 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in vti_input() 57 if (tunnel) { in vti_input() 61 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; in vti_input() 64 skb->dev = tunnel->dev; in vti_input() 106 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local 110 if (!tunnel) in vti_rcv_cb() 113 dev = tunnel->dev; in vti_rcv_cb() 137 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb() 144 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); in vti_rcv_cb() [all …]
|
D | ipip.c | 217 struct ip_tunnel *tunnel; in ipip_tunnel_rcv() local 221 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in ipip_tunnel_rcv() 223 if (tunnel) { in ipip_tunnel_rcv() 226 if (tunnel->parms.iph.protocol != ipproto && in ipip_tunnel_rcv() 227 tunnel->parms.iph.protocol != 0) in ipip_tunnel_rcv() 240 if (tunnel->collect_md) { in ipip_tunnel_rcv() 245 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv() 274 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip_tunnel_xmit() local 275 const struct iphdr *tiph = &tunnel->parms.iph; in ipip_tunnel_xmit() 302 if (tunnel->collect_md) in ipip_tunnel_xmit() [all …]
|
/Linux-v5.4/net/ipv6/ |
D | sit.c | 71 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, 473 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local 474 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit() 479 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit() 480 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit() 482 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit() 564 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument 568 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd() 585 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument 591 prefix_len = tunnel->ip6rd.prefixlen + 32 in only_dnatted() [all …]
|
D | ip6_gre.c | 492 struct ip6_tnl *tunnel; in ip6gre_rcv() local 495 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6gre_rcv() 498 if (tunnel) { in ip6gre_rcv() 499 if (tunnel->parms.collect_md) { in ip6gre_rcv() 511 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv() 513 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv() 529 struct ip6_tnl *tunnel; in ip6erspan_rcv() local 536 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv() 539 if (tunnel) { in ip6erspan_rcv() 550 if (tunnel->parms.collect_md) { in ip6erspan_rcv() [all …]
|
D | ip6_tunnel.c | 770 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument 783 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv() 785 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv() 786 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv() 787 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv() 791 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv() 793 (tunnel->i_seqno && in __ip6_tnl_rcv() 794 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv() 795 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv() 796 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv() [all …]
|
/Linux-v5.4/Documentation/networking/ |
D | l2tp.txt | 3 more sessions over an IP tunnel. It is commonly used for VPNs 4 (L2TP/IPSec) and by ISPs to tunnel subscriber PPP sessions over an IP 21 L2TPv2 functionality (rfc2661). L2TPv2 is used to tunnel one or more PPP 22 sessions over a UDP tunnel. 25 to be passed over an L2TP tunnel by moving the PPP-specific parts of 49 Each L2TP tunnel is implemented using a UDP or L2TPIP socket; L2TPIP 51 new l2tpip socket family. The tunnel socket is typically created by 71 tunnel, the interface can be given an IP addresses of itself and its 72 peer. If non-IP frames are to be passed over the tunnel, the interface 76 Each tunnel and session within a tunnel is assigned a unique tunnel_id [all …]
|
D | gtp.txt | 7 of a GTP tunnel endpoint. 18 such a tunnel between that external data network and the phone. The 19 tunnel endpoints thus reside on the phone and in the gateway. All 29 is translated into GTP *without breaking the end-to-end tunnel*. So 33 or P-GW (LTE), which terminates the tunnel, decapsulates the packet 46 The module implements the function of a tunnel endpoint, i.e. it is 63 to handle the tunnel establishment, authentication etc. and only the 144 === Local GTP-U entity and tunnel identification === 153 A specific tunnel is only defined by the destination entity. Since the 155 a tunnel. The source IP and Port have no meaning for the tunnel. [all …]
|
/Linux-v5.4/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-v5.4/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | tc_tun.c | 176 if (!e->tunnel) { in mlx5e_gen_ip_tunnel_header() 181 return e->tunnel->generate_ip_tun_hdr(buf, ip_proto, e); in mlx5e_gen_ip_tunnel_header() 237 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_create_header_ipv4() 356 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_create_header_ipv6() 449 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(netdev); in mlx5e_tc_tun_device_to_offload() local 451 if (tunnel && tunnel->can_offload(priv)) in mlx5e_tc_tun_device_to_offload() 462 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(tunnel_dev); in mlx5e_tc_tun_init_encap_attr() local 464 if (!tunnel) { in mlx5e_tc_tun_init_encap_attr() 469 return tunnel->init_encap_attr(tunnel_dev, priv, e, extack); in mlx5e_tc_tun_init_encap_attr() 479 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(filter_dev); in mlx5e_tc_tun_parse() local [all …]
|
/Linux-v5.4/Documentation/devicetree/bindings/i2c/ |
D | i2c-cros-ec-tunnel.txt | 6 to tunnel our i2c commands through the EC. 13 - compatible: google,cros-ec-i2c-tunnel 26 i2c-tunnel { 27 compatible = "google,cros-ec-i2c-tunnel";
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_ipip.c | 235 struct ip_tunnel *tunnel = netdev_priv(ol_dev); in mlxsw_sp_ipip_can_offload_gre4() local 237 bool inherit_ttl = tunnel->parms.iph.ttl == 0; in mlxsw_sp_ipip_can_offload_gre4() 238 bool inherit_tos = tunnel->parms.iph.tos & 0x1; in mlxsw_sp_ipip_can_offload_gre4() 240 return (tunnel->parms.i_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4() 241 (tunnel->parms.o_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4()
|