Home
last modified time | relevance | path

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

123456

/Linux-v6.6/drivers/thunderbolt/
Dtunnel.c61 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ argument
63 struct tb_tunnel *__tunnel = (tunnel); \
73 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ argument
74 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg)
75 #define tb_tunnel_warn(tunnel, fmt, arg...) \ argument
76 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg)
77 #define tb_tunnel_info(tunnel, fmt, arg...) \ argument
78 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
79 #define tb_tunnel_dbg(tunnel, fmt, arg...) \ argument
80 __TB_TUNNEL_PRINT(tb_dbg, tunnel, fmt, ##arg)
[all …]
Dtunnel.h55 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,
92 bool tb_tunnel_match_dma(const struct tb_tunnel *tunnel, int transmit_path,
[all …]
Dtb.c99 struct tb_tunnel *tunnel; in tb_attach_bandwidth_group() local
107 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_attach_bandwidth_group()
108 if (!tb_tunnel_is_dp(tunnel)) in tb_attach_bandwidth_group()
111 if (tunnel->src_port->sw == in->sw && in tb_attach_bandwidth_group()
112 tunnel->dst_port->sw == out->sw) { in tb_attach_bandwidth_group()
113 group = tunnel->src_port->group; in tb_attach_bandwidth_group()
235 struct tb_tunnel *tunnel; in tb_discover_dp_resources() local
237 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_discover_dp_resources()
238 if (tb_tunnel_is_dp(tunnel)) in tb_discover_dp_resources()
239 tb_discover_dp_resource(tb, tunnel->dst_port); in tb_discover_dp_resources()
[all …]
Dtest.c1393 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-v6.6/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.c39 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()
82 if (!pd->tunnel) in l2tp_dfs_seq_start()
88 if (!pd->tunnel && !pd->session) in l2tp_dfs_seq_start()
115 if (pd->tunnel) { in l2tp_dfs_seq_stop()
116 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_seq_stop()
117 pd->tunnel = NULL; in l2tp_dfs_seq_stop()
[all …]
Dl2tp_ppp.c272 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local
285 tunnel = session->tunnel; in pppol2tp_sendmsg()
287 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg()
349 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local
360 tunnel = session->tunnel; in pppol2tp_xmit()
362 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit()
642 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument
646 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu()
657 struct l2tp_tunnel *tunnel; in pppol2tp_tunnel_get() local
662 tunnel = l2tp_tunnel_get(net, info->tunnel_id); in pppol2tp_tunnel_get()
[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()
/Linux-v6.6/drivers/net/
Damt.c121 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-v6.6/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()
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 …]
Dip_gre.c269 struct ip_tunnel *tunnel; in erspan_rcv() local
279 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
285 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
290 if (tunnel) { in erspan_rcv()
305 if (tunnel->collect_md) { in erspan_rcv()
341 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
356 struct ip_tunnel *tunnel; in __ipgre_rcv() local
359 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
362 if (tunnel) { in __ipgre_rcv()
372 if (tunnel->dev->header_ops == &ipgre_header_ops) 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()
248 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv()
277 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip_tunnel_xmit() local
278 const struct iphdr *tiph = &tunnel->parms.iph; in ipip_tunnel_xmit()
305 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 …]
/Linux-v6.6/net/ipv6/
Dsit.c71 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
512 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local
513 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit()
518 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
519 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit()
521 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit()
522 netdev_put(dev, &tunnel->dev_tracker); in ipip6_tunnel_uninit()
603 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument
607 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd()
624 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument
[all …]
Dip6_gre.c491 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
535 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv()
538 if (tunnel) { in ip6erspan_rcv()
549 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
[all …]
/Linux-v6.6/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 …]
/Linux-v6.6/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
/Linux-v6.6/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 …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun.c126 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(dev); in mlx5e_route_lookup_ipv4_get() local
128 if (tunnel && tunnel->get_remote_ifindex) in mlx5e_route_lookup_ipv4_get()
129 attr->fl.fl4.flowi4_oif = tunnel->get_remote_ifindex(dev); in mlx5e_route_lookup_ipv4_get()
191 if (!e->tunnel) { in mlx5e_gen_ip_tunnel_header()
196 return e->tunnel->generate_ip_tun_hdr(buf, ip_proto, e); in mlx5e_gen_ip_tunnel_header()
251 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_create_header_ipv4()
366 e->tunnel->calc_hlen(e); in mlx5e_tc_tun_update_header_ipv4()
447 struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(dev); in mlx5e_route_lookup_ipv6_get() local
454 if (tunnel && tunnel->get_remote_ifindex) in mlx5e_route_lookup_ipv6_get()
455 attr->fl.fl6.flowi6_oif = tunnel->get_remote_ifindex(dev); in mlx5e_route_lookup_ipv6_get()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/lag/
Dport_sel.c194 enum mlx5_traffic_types tt, bool tunnel, in mlx5_lag_set_definer() argument
200 if (tunnel) in mlx5_lag_set_definer()
292 enum mlx5_traffic_types tt, bool tunnel, u8 *ports) in mlx5_lag_create_definer() argument
311 format_id = mlx5_lag_set_definer(match_definer_mask, tt, tunnel, hash); in mlx5_lag_create_definer()
389 if (!port_sel->tunnel) in mlx5_lag_create_definers()
412 port_sel->tunnel = false; in set_tt_map()
416 port_sel->tunnel = true; in set_tt_map()
428 port_sel->tunnel = true; in set_tt_map()
490 ttc_params->inner_ttc = port_sel->tunnel; in mlx5_lag_set_outer_ttc_params()
491 if (!port_sel->tunnel) in mlx5_lag_set_outer_ttc_params()
[all …]

123456