Home
last modified time | relevance | path

Searched refs:tunnel (Results 1 – 25 of 86) sorted by relevance

1234

/Linux-v4.19/drivers/thunderbolt/
Dtunnel_pci.c14 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ argument
16 struct tb_pci_tunnel *__tunnel = (tunnel); \
25 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ argument
26 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg)
27 #define tb_tunnel_warn(tunnel, fmt, arg...) \ argument
28 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg)
29 #define tb_tunnel_info(tunnel, fmt, arg...) \ argument
30 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
62 struct tb_pci_tunnel *tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL); in tb_pci_alloc() local
63 if (!tunnel) in tb_pci_alloc()
[all …]
Dtb.c94 struct tb_pci_tunnel *tunnel; in tb_free_invalid_tunnels() local
97 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_free_invalid_tunnels()
98 if (tb_pci_is_invalid(tunnel)) { in tb_free_invalid_tunnels()
99 tb_pci_deactivate(tunnel); in tb_free_invalid_tunnels()
100 list_del(&tunnel->list); in tb_free_invalid_tunnels()
101 tb_pci_free(tunnel); in tb_free_invalid_tunnels()
181 struct tb_pci_tunnel *tunnel; in tb_activate_pcie_devices() local
217 tunnel = tb_pci_alloc(tb, up_port, down_port); in tb_activate_pcie_devices()
218 if (!tunnel) { in tb_activate_pcie_devices()
224 if (tb_pci_activate(tunnel)) { in tb_activate_pcie_devices()
[all …]
Dtunnel_pci.h24 void tb_pci_free(struct tb_pci_tunnel *tunnel);
25 int tb_pci_activate(struct tb_pci_tunnel *tunnel);
26 int tb_pci_restart(struct tb_pci_tunnel *tunnel);
27 void tb_pci_deactivate(struct tb_pci_tunnel *tunnel);
28 bool tb_pci_is_invalid(struct tb_pci_tunnel *tunnel);
/Linux-v4.19/net/l2tp/
Dl2tp_core.c153 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) in l2tp_session_id_hash() argument
155 return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)]; in l2tp_session_id_hash()
158 void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument
160 sock_put(tunnel->sock); in l2tp_tunnel_free()
169 struct l2tp_tunnel *tunnel; in l2tp_tunnel_get() local
172 list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) { in l2tp_tunnel_get()
173 if (tunnel->tunnel_id == tunnel_id) { in l2tp_tunnel_get()
174 l2tp_tunnel_inc_refcount(tunnel); in l2tp_tunnel_get()
177 return tunnel; in l2tp_tunnel_get()
189 struct l2tp_tunnel *tunnel; in l2tp_tunnel_get_nth() local
[all …]
Dl2tp_debugfs.c44 struct l2tp_tunnel *tunnel; member
51 if (pd->tunnel) in l2tp_dfs_next_tunnel()
52 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_next_tunnel()
54 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx); in l2tp_dfs_next_tunnel()
64 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx); in l2tp_dfs_next_session()
85 if (pd->tunnel == NULL) in l2tp_dfs_seq_start()
91 if ((pd->tunnel == NULL) && (pd->session == NULL)) in l2tp_dfs_seq_start()
119 if (pd->tunnel) { in l2tp_dfs_seq_stop()
120 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_seq_stop()
121 pd->tunnel = NULL; in l2tp_dfs_seq_stop()
[all …]
Dl2tp_ppp.c283 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local
296 tunnel = session->tunnel; in pppol2tp_sendmsg()
298 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg()
360 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local
371 tunnel = session->tunnel; in pppol2tp_xmit()
373 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit()
652 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument
656 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu()
672 struct l2tp_tunnel *tunnel; in pppol2tp_connect() local
702 tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id); in pppol2tp_connect()
[all …]
Dl2tp_netlink.c43 int flags, struct l2tp_tunnel *tunnel, u8 cmd);
56 struct l2tp_tunnel *tunnel; in l2tp_nl_session_get() local
67 tunnel = l2tp_tunnel_get(net, tunnel_id); in l2tp_nl_session_get()
68 if (tunnel) { in l2tp_nl_session_get()
69 session = l2tp_tunnel_get_session(tunnel, session_id); in l2tp_nl_session_get()
70 l2tp_tunnel_dec_refcount(tunnel); in l2tp_nl_session_get()
109 struct l2tp_tunnel *tunnel, in l2tp_tunnel_notify() argument
120 NLM_F_ACK, tunnel, cmd); in l2tp_tunnel_notify()
171 struct l2tp_tunnel *tunnel; in l2tp_nl_cmd_tunnel_create() local
244 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create()
[all …]
Dl2tp_core.h79 struct l2tp_tunnel *tunnel; /* back pointer to tunnel member
184 int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel,
197 struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel,
200 void l2tp_tunnel_free(struct l2tp_tunnel *tunnel);
203 struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth);
210 int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,
213 void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
215 struct l2tp_tunnel *tunnel,
219 struct l2tp_tunnel *tunnel);
238 static inline void l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel) in l2tp_tunnel_inc_refcount() argument
[all …]
Dl2tp_eth.c222 static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel, in l2tp_eth_adjust_mtu() argument
231 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_eth_adjust_mtu()
236 lock_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
237 l3_overhead = kernel_sock_ip_overhead(tunnel->sock); in l2tp_eth_adjust_mtu()
238 release_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
253 mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead; in l2tp_eth_adjust_mtu()
262 static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, in l2tp_eth_create() argument
282 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, in l2tp_eth_create()
299 l2tp_eth_adjust_mtu(tunnel, session, dev); in l2tp_eth_create()
319 rc = l2tp_session_register(session, tunnel); in l2tp_eth_create()
Dl2tp_ip.c125 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip_recv() local
151 tunnel = session->tunnel; in l2tp_ip_recv()
152 if (!tunnel) in l2tp_ip_recv()
156 if (tunnel->debug & L2TP_MSG_DATA) { in l2tp_ip_recv()
164 pr_debug("%s: ip recv\n", tunnel->name); in l2tp_ip_recv()
237 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_ip_destroy_sock() local
242 if (tunnel) in l2tp_ip_destroy_sock()
243 l2tp_tunnel_delete(tunnel); in l2tp_ip_destroy_sock()
DKconfig19 L2TP is often used to tunnel PPP traffic over IP
20 tunnels. One IP tunnel may carry thousands of individual PPP
29 userland daemon handles L2TP the control protocol (tunnel
67 tunnel raw ethernet frames using L2TP, say Y here. If
79 userspace L2TPv3 daemons may create L2TP/IP tunnel sockets
Dl2tp_ip6.c138 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip6_recv() local
164 tunnel = session->tunnel; in l2tp_ip6_recv()
165 if (!tunnel) in l2tp_ip6_recv()
169 if (tunnel->debug & L2TP_MSG_DATA) { in l2tp_ip6_recv()
177 pr_debug("%s: ip recv\n", tunnel->name); in l2tp_ip6_recv()
250 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_ip6_destroy_sock() local
256 if (tunnel) in l2tp_ip6_destroy_sock()
257 l2tp_tunnel_delete(tunnel); in l2tp_ip6_destroy_sock()
/Linux-v4.19/net/ipv4/
Dip_tunnel.c252 struct ip_tunnel *tunnel; in __ip_tunnel_create() local
278 tunnel = netdev_priv(dev); in __ip_tunnel_create()
279 tunnel->parms = *parms; in __ip_tunnel_create()
280 tunnel->net = net; in __ip_tunnel_create()
297 struct ip_tunnel *tunnel = netdev_priv(dev); in ip_tunnel_bind_dev() local
301 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev()
303 iph = &tunnel->parms.iph; in ip_tunnel_bind_dev()
311 iph->saddr, tunnel->parms.o_key, in ip_tunnel_bind_dev()
312 RT_TOS(iph->tos), tunnel->parms.link, in ip_tunnel_bind_dev()
313 tunnel->fwmark); in ip_tunnel_bind_dev()
[all …]
Dip_gre.c265 struct ip_tunnel *tunnel; in erspan_rcv() local
286 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
290 if (tunnel) { in erspan_rcv()
304 if (tunnel->collect_md) { in erspan_rcv()
331 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
346 struct ip_tunnel *tunnel; in __ipgre_rcv() local
349 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
352 if (tunnel) { in __ipgre_rcv()
357 if (tunnel->dev->type != ARPHRD_NONE) in __ipgre_rcv()
361 if (tunnel->collect_md) { in __ipgre_rcv()
[all …]
Dipip.c223 struct ip_tunnel *tunnel; in ipip_tunnel_rcv() local
227 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, 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()
251 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv()
280 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip_tunnel_xmit() local
281 const struct iphdr *tiph = &tunnel->parms.iph; in ipip_tunnel_xmit()
305 if (tunnel->collect_md) in ipip_tunnel_xmit()
[all …]
Dip_vti.c55 struct ip_tunnel *tunnel; in vti_input() local
60 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in vti_input()
62 if (tunnel) { in vti_input()
66 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; in vti_input()
92 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local
96 if (!tunnel) in vti_rcv_cb()
99 dev = tunnel->dev; in vti_rcv_cb()
123 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb()
130 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); in vti_rcv_cb()
167 struct ip_tunnel *tunnel = netdev_priv(dev); in vti_xmit() local
[all …]
Dxfrm4_protocol.c73 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_rcv_encap()
97 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_esp_rcv()
123 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_ah_rcv()
149 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_ipcomp_rcv()
/Linux-v4.19/net/ipv6/
Dsit.c75 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
477 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local
478 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit()
483 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
484 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit()
486 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit()
567 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument
571 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd()
588 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument
594 prefix_len = tunnel->ip6rd.prefixlen + 32 in only_dnatted()
[all …]
Dip6_gre.c513 struct ip6_tnl *tunnel; in ip6gre_rcv() local
516 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6gre_rcv()
519 if (tunnel) { in ip6gre_rcv()
520 if (tunnel->parms.collect_md) { in ip6gre_rcv()
532 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv()
534 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv()
550 struct ip6_tnl *tunnel; in ip6erspan_rcv() local
561 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv()
564 if (tunnel) { in ip6erspan_rcv()
578 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
[all …]
Dip6_tunnel.c775 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
788 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv()
790 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv()
791 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv()
792 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
796 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv()
798 (tunnel->i_seqno && in __ip6_tnl_rcv()
799 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
800 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv()
801 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
[all …]
/Linux-v4.19/Documentation/networking/
Dl2tp.txt3 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 …]
Dgtp.txt7 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-v4.19/Documentation/devicetree/bindings/i2c/
Di2c-cros-ec-tunnel.txt6 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-v4.19/tools/testing/selftests/net/
Dpmtu.sh151 …esp aead "rfc4106(gcm(aes))" 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f 128 mode tunnel || return 1
152 …x1001 proto esp aead "rfc4106(gcm(aes))" 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f 128 mode tunnel
153 …o} xfrm policy add dir out mark 10 tmpl src ${veth_a_addr} dst ${veth_b_addr} proto esp mode tunnel
154 …to} xfrm policy add dir in mark 10 tmpl src ${veth_b_addr} dst ${veth_a_addr} proto esp mode tunnel
156 …x1000 proto esp aead "rfc4106(gcm(aes))" 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f 128 mode tunnel
157 …x1001 proto esp aead "rfc4106(gcm(aes))" 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f 128 mode tunnel
158 …o} xfrm policy add dir out mark 10 tmpl src ${veth_b_addr} dst ${veth_a_addr} proto esp mode tunnel
159 …to} xfrm policy add dir in mark 10 tmpl src ${veth_a_addr} dst ${veth_b_addr} proto esp mode tunnel
/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_ipip.c233 struct ip_tunnel *tunnel = netdev_priv(ol_dev); in mlxsw_sp_ipip_can_offload_gre4() local
235 bool inherit_ttl = tunnel->parms.iph.ttl == 0; in mlxsw_sp_ipip_can_offload_gre4()
236 bool inherit_tos = tunnel->parms.iph.tos & 0x1; in mlxsw_sp_ipip_can_offload_gre4()
238 return (tunnel->parms.i_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4()
239 (tunnel->parms.o_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4()

1234