Home
last modified time | relevance | path

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

12345

/kernel/linux/linux-5.10/drivers/thunderbolt/
Dtunnel.c42 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ argument
44 struct tb_tunnel *__tunnel = (tunnel); \
54 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ argument
55 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg)
56 #define tb_tunnel_warn(tunnel, fmt, arg...) \ argument
57 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg)
58 #define tb_tunnel_info(tunnel, fmt, arg...) \ argument
59 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
60 #define tb_tunnel_dbg(tunnel, fmt, arg...) \ argument
61 __TB_TUNNEL_PRINT(tb_dbg, tunnel, fmt, ##arg)
[all …]
Dtunnel.h49 int (*init)(struct tb_tunnel *tunnel);
50 int (*activate)(struct tb_tunnel *tunnel, bool activate);
51 int (*consumed_bandwidth)(struct tb_tunnel *tunnel, int *consumed_up,
53 int (*release_unused_bandwidth)(struct tb_tunnel *tunnel);
54 void (*reclaim_available_bandwidth)(struct tb_tunnel *tunnel,
81 void tb_tunnel_free(struct tb_tunnel *tunnel);
82 int tb_tunnel_activate(struct tb_tunnel *tunnel);
83 int tb_tunnel_restart(struct tb_tunnel *tunnel);
84 void tb_tunnel_deactivate(struct tb_tunnel *tunnel);
85 bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel);
[all …]
Dtb.c112 struct tb_tunnel *tunnel = NULL; in tb_discover_tunnels() local
116 tunnel = tb_tunnel_discover_dp(tb, port); in tb_discover_tunnels()
120 tunnel = tb_tunnel_discover_pci(tb, port); in tb_discover_tunnels()
124 tunnel = tb_tunnel_discover_usb3(tb, port); in tb_discover_tunnels()
131 if (!tunnel) in tb_discover_tunnels()
134 if (tb_tunnel_is_pci(tunnel)) { in tb_discover_tunnels()
135 struct tb_switch *parent = tunnel->dst_port->sw; in tb_discover_tunnels()
137 while (parent != tunnel->src_port->sw) { in tb_discover_tunnels()
141 } else if (tb_tunnel_is_dp(tunnel)) { in tb_discover_tunnels()
143 pm_runtime_get_sync(&tunnel->src_port->sw->dev); in tb_discover_tunnels()
[all …]
Dtest.c1266 struct tb_tunnel *tunnel; in tb_test_tunnel_dp() local
1282 tunnel = tb_tunnel_alloc_dp(NULL, in, out, 0, 0); in tb_test_tunnel_dp()
1283 KUNIT_ASSERT_TRUE(test, tunnel != NULL); in tb_test_tunnel_dp()
1284 KUNIT_EXPECT_EQ(test, tunnel->type, (enum tb_tunnel_type)TB_TUNNEL_DP); in tb_test_tunnel_dp()
1285 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, in); in tb_test_tunnel_dp()
1286 KUNIT_EXPECT_PTR_EQ(test, tunnel->dst_port, out); in tb_test_tunnel_dp()
1287 KUNIT_ASSERT_EQ(test, tunnel->npaths, (size_t)3); in tb_test_tunnel_dp()
1288 KUNIT_ASSERT_EQ(test, tunnel->paths[0]->path_length, 2); in tb_test_tunnel_dp()
1289 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].in_port, in); in tb_test_tunnel_dp()
1290 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[1].out_port, out); in tb_test_tunnel_dp()
[all …]
/kernel/linux/linux-5.10/net/l2tp/
Dl2tp_core.c146 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) in l2tp_session_id_hash() argument
148 return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)]; in l2tp_session_id_hash()
151 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument
153 trace_free_tunnel(tunnel); in l2tp_tunnel_free()
154 sock_put(tunnel->sock); in l2tp_tunnel_free()
161 if (session->tunnel) in l2tp_session_free()
162 l2tp_tunnel_dec_refcount(session->tunnel); in l2tp_session_free()
168 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_sk_to_tunnel() local
170 if (tunnel) in l2tp_sk_to_tunnel()
171 if (WARN_ON(tunnel->magic != L2TP_TUNNEL_MAGIC)) in l2tp_sk_to_tunnel()
[all …]
Dl2tp_debugfs.c38 struct l2tp_tunnel *tunnel; member
45 if (pd->tunnel) in l2tp_dfs_next_tunnel()
46 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_next_tunnel()
48 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx); in l2tp_dfs_next_tunnel()
58 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx); in l2tp_dfs_next_session()
81 if (!pd->tunnel) in l2tp_dfs_seq_start()
87 if (!pd->tunnel && !pd->session) 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 …]
Dl2tp_ppp.c273 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local
286 tunnel = session->tunnel; in pppol2tp_sendmsg()
288 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg()
350 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local
361 tunnel = session->tunnel; in pppol2tp_xmit()
363 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit()
643 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument
647 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu()
663 struct l2tp_tunnel *tunnel; in pppol2tp_connect() local
693 tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id); in pppol2tp_connect()
[all …]
Dl2tp_netlink.c38 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_tunnel_get_session(tunnel, session_id); in l2tp_nl_session_get()
65 l2tp_tunnel_dec_refcount(tunnel); in l2tp_nl_session_get()
104 struct l2tp_tunnel *tunnel, in l2tp_tunnel_notify() argument
115 NLM_F_ACK, tunnel, cmd); in l2tp_tunnel_notify()
192 struct l2tp_tunnel *tunnel; in l2tp_nl_cmd_tunnel_create() local
237 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create()
[all …]
Dtrace.h28 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 …]
Dl2tp_core.h74 struct l2tp_tunnel *tunnel; /* back pointer to tunnel context */ member
198 int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel,
216 void l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel);
217 void l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel);
227 struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel,
231 struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth);
242 int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,
244 void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
247 struct l2tp_tunnel *tunnel,
251 struct l2tp_tunnel *tunnel);
[all …]
Dl2tp_eth.c204 static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel, in l2tp_eth_adjust_mtu() argument
213 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_eth_adjust_mtu()
218 lock_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
219 l3_overhead = kernel_sock_ip_overhead(tunnel->sock); in l2tp_eth_adjust_mtu()
220 release_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
235 mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead; in l2tp_eth_adjust_mtu()
244 static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, in l2tp_eth_create() argument
264 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, in l2tp_eth_create()
281 l2tp_eth_adjust_mtu(tunnel, session, dev); in l2tp_eth_create()
301 rc = l2tp_session_register(session, tunnel); in l2tp_eth_create()
DKconfig20 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
/kernel/linux/linux-5.10/net/ipv4/
Dip_tunnel.c237 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()
297 RT_TOS(iph->tos), tunnel->parms.link, in ip_tunnel_bind_dev()
298 tunnel->fwmark, 0); in ip_tunnel_bind_dev()
[all …]
Dip_gre.c267 struct ip_tunnel *tunnel; in erspan_rcv() local
277 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
283 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
288 if (tunnel) { in erspan_rcv()
303 if (tunnel->collect_md) { in erspan_rcv()
339 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
354 struct ip_tunnel *tunnel; in __ipgre_rcv() local
357 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
360 if (tunnel) { in __ipgre_rcv()
367 if (tunnel->dev->type != ARPHRD_NONE) in __ipgre_rcv()
[all …]
Dipip.c217 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 …]
Dip_vti.c50 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()
100 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local
104 if (!tunnel) in vti_rcv_cb()
107 dev = tunnel->dev; in vti_rcv_cb()
131 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb()
138 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); in vti_rcv_cb()
[all …]
/kernel/linux/linux-5.10/net/ipv6/
Dsit.c71 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
509 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local
510 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit()
515 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
516 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit()
518 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit()
600 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument
604 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd()
621 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument
627 prefix_len = tunnel->ip6rd.prefixlen + 32 in only_dnatted()
[all …]
Dip6_gre.c496 struct ip6_tnl *tunnel; in ip6gre_rcv() local
499 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6gre_rcv()
502 if (tunnel) { in ip6gre_rcv()
503 if (tunnel->parms.collect_md) { in ip6gre_rcv()
515 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv()
517 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv()
533 struct ip6_tnl *tunnel; in ip6erspan_rcv() local
540 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv()
543 if (tunnel) { in ip6erspan_rcv()
554 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
[all …]
Dip6_tunnel.c824 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
837 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv()
839 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv()
840 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv()
841 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
845 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv()
847 (tunnel->i_seqno && in __ip6_tnl_rcv()
848 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
849 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv()
850 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
[all …]
/kernel/linux/linux-5.10/Documentation/networking/
Dl2tp.rst27 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 …]
Dbareudp.rst11 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
Dgtp.rst12 of a GTP tunnel endpoint.
24 such a tunnel between that external data network and the phone. The
25 tunnel endpoints thus reside on the phone and in the gateway. All
35 is translated into GTP *without breaking the end-to-end tunnel*. So
39 or P-GW (LTE), which terminates the tunnel, decapsulates the packet
53 The module implements the function of a tunnel endpoint, i.e. it is
70 to handle the tunnel establishment, authentication etc. and only the
159 Local GTP-U entity and tunnel identification
169 A specific tunnel is only defined by the destination entity. Since the
171 a tunnel. The source IP and Port have no meaning for the tunnel.
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dwith_tunnels.sh15 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
/kernel/linux/linux-5.10/tools/testing/selftests/net/
Dvrf-xfrm-tests.sh223 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
228 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
233 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel
238 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel
244 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel
249 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel
254 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel
259 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel
265 proto esp spi ${SPI_1} reqid 0 mode tunnel \
272 proto esp spi ${SPI_1} reqid 0 mode tunnel \
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun.c153 if (!e->tunnel) { in mlx5e_gen_ip_tunnel_header()
158 return e->tunnel->generate_ip_tun_hdr(buf, ip_proto, e); in mlx5e_gen_ip_tunnel_header()
214 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_create_header_ipv4()
379 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_create_header_ipv6()
472 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(netdev); in mlx5e_tc_tun_device_to_offload() local
474 if (tunnel && tunnel->can_offload(priv)) in mlx5e_tc_tun_device_to_offload()
485 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(tunnel_dev); in mlx5e_tc_tun_init_encap_attr() local
487 if (!tunnel) { in mlx5e_tc_tun_init_encap_attr()
492 return tunnel->init_encap_attr(tunnel_dev, priv, e, extack); in mlx5e_tc_tun_init_encap_attr()
501 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(filter_dev); in mlx5e_tc_tun_parse() local
[all …]

12345