Home
last modified time | relevance | path

Searched full:tunnel (Results 1 – 25 of 493) sorted by relevance

12345678910>>...20

/openbmc/linux/drivers/thunderbolt/
H A Dtunnel.c15 #include "tunnel.h"
108 /* Add some credits for potential second DMA tunnel */ in tb_available_credits()
140 struct tb_tunnel *tunnel; in tb_tunnel_alloc() local
142 tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL); in tb_tunnel_alloc()
143 if (!tunnel) in tb_tunnel_alloc()
146 tunnel->paths = kcalloc(npaths, sizeof(tunnel->paths[0]), GFP_KERNEL); in tb_tunnel_alloc()
147 if (!tunnel->paths) { in tb_tunnel_alloc()
148 tb_tunnel_free(tunnel); in tb_tunnel_alloc()
152 INIT_LIST_HEAD(&tunnel->list); in tb_tunnel_alloc()
153 tunnel->tb = tb; in tb_tunnel_alloc()
[all …]
H A Dtunnel.h22 * struct tb_tunnel - Tunnel between two ports
24 * @src_port: Source port of the tunnel
25 * @dst_port: Destination port of the tunnel. For discovered incomplete
27 * @paths: All paths required by the tunnel
29 * @init: Optional tunnel specific initialization
30 * @deinit: Optional tunnel specific de-initialization
31 * @activate: Optional tunnel specific activation/deactivation
32 * @maximum_bandwidth: Returns maximum possible bandwidth for this tunnel
33 * @allocated_bandwidth: Return how much bandwidth is allocated for the tunnel
34 * @alloc_bandwidth: Change tunnel bandwidth allocation
[all …]
H A Dtb.c17 #include "tunnel.h"
122 struct tb_tunnel *tunnel; in tb_attach_bandwidth_group() local
130 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_attach_bandwidth_group()
131 if (!tb_tunnel_is_dp(tunnel)) in tb_attach_bandwidth_group()
134 if (tunnel->src_port->sw == in->sw && in tb_attach_bandwidth_group()
135 tunnel->dst_port->sw == out->sw) { in tb_attach_bandwidth_group()
136 group = tunnel->src_port->group; in tb_attach_bandwidth_group()
258 struct tb_tunnel *tunnel; in tb_discover_dp_resources() local
260 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_discover_dp_resources()
261 if (tb_tunnel_is_dp(tunnel)) in tb_discover_dp_resources()
[all …]
H A Dtest.c13 #include "tunnel.h"
1341 * Create PCIe tunnel between host and two devices. in tb_test_tunnel_pcie()
1393 struct tb_tunnel *tunnel; in tb_test_tunnel_dp() local
1396 * Create DP tunnel between Host and Device in tb_test_tunnel_dp()
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()
[all …]
/openbmc/linux/net/l2tp/
H A Dl2tp_core.c151 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) in l2tp_session_id_hash() argument
153 return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)]; in l2tp_session_id_hash()
156 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument
158 trace_free_tunnel(tunnel); in l2tp_tunnel_free()
159 sock_put(tunnel->sock); in l2tp_tunnel_free()
160 /* the tunnel is freed in the socket destructor */ in l2tp_tunnel_free()
166 if (session->tunnel) in l2tp_session_free()
167 l2tp_tunnel_dec_refcount(session->tunnel); in l2tp_session_free()
173 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_sk_to_tunnel() local
175 if (tunnel) in l2tp_sk_to_tunnel()
[all …]
H A Dl2tp_ppp.c27 * zero, the socket is treated as a special tunnel management socket.
151 /* Helpers to obtain tunnel/session contexts from sockets.
272 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local
279 /* Get session and tunnel contexts */ in pppol2tp_sendmsg()
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
355 /* Get session and tunnel contexts from the socket */ in pppol2tp_xmit()
360 tunnel = session->tunnel; in pppol2tp_xmit()
362 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit()
[all …]
H A 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
220 /* Managed tunnels take the tunnel socket from userspace. in l2tp_nl_cmd_tunnel_create()
[all …]
H A Dl2tp_debugfs.c37 int tunnel_idx; /* current tunnel */
38 int session_idx; /* index of session within current tunnel */
39 struct l2tp_tunnel *tunnel; member
40 struct l2tp_session *session; /* NULL means get next tunnel */
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()
87 /* NULL tunnel and session indicates end of list */ in l2tp_dfs_seq_start()
[all …]
H A Dl2tp_core.h18 /* Random numbers used for internal consistency checks of tunnel and session structures */
22 /* Per tunnel session hash table size */
66 * Is linked into a per-tunnel session hashlist; and in the case of an L2TPv3 session into
74 struct l2tp_tunnel *tunnel; /* back pointer to tunnel context */ member
86 u32 nr_max; /* max NR. Depends on tunnel */
132 /* L2TP tunnel configuration */
150 /* Represents a tunnel instance.
152 * Holds the tunnel socket (either passed from userspace or directly created by the kernel).
153 * Maintains a hashlist of sessions belonging to the tunnel instance.
164 bool acpt_newsess; /* indicates whether this tunnel accepts
[all …]
H A 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 …]
/openbmc/linux/Documentation/networking/
H A 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.
57 Tunnel Sockets
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::
[all …]
H A Dgtp.rst12 of a GTP tunnel endpoint.
17 GTP is the Generic Tunnel Protocol, which is a 3GPP protocol used for
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
166 instance) per IP address. Tunnel Endpoint Identifier (TEID) are unique
[all …]
/openbmc/linux/include/uapi/linux/
H A Dip6_tunnel.h28 char name[IFNAMSIZ]; /* name of tunnel device */
30 __u8 proto; /* tunnel protocol */
31 __u8 encap_limit; /* encapsulation limit for tunnel */
32 __u8 hop_limit; /* hop limit for tunnel */
33 __be32 flowinfo; /* traffic class and flowlabel for tunnel */
34 __u32 flags; /* tunnel flags */
35 struct in6_addr laddr; /* local tunnel end-point address */
36 struct in6_addr raddr; /* remote tunnel end-point address */
40 char name[IFNAMSIZ]; /* name of tunnel device */
42 __u8 proto; /* tunnel protocol */
[all …]
/openbmc/linux/net/ipv4/
H A Dip_tunnel.c73 /* Fallback tunnel: no source, no destination, no key, no options
75 Tunnel hash table:
77 it will match only tunnel with the same key; if it is not present,
78 it will match only keyless tunnel.
81 will match fallback tunnel.
82 Given src, dst and key, find appropriate for input tunnel.
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()
[all …]
H A Dipip.c22 /* tunnel.c: an IP tunnel driver
24 The purpose of this driver is to provide an IP tunnel through
25 which you can tunnel network traffic transparently across subnets.
36 Made the tunnels use dev->name not tunnel: when error reporting.
42 Changed to tunnel to destination gateway in addition to the
43 tunnel's pointopoint address
51 /* Things I wish I had known when writing the tunnel driver:
55 contains the tunnel device that _we_ are.
201 /* no tunnel info required for ipip. */
207 /* no tunnel info required for mplsip. */
[all …]
H A Dip_gre.c75 - traceroute does not work. I planned to relay ICMP from tunnel,
93 (branches, that exceed pmtu are pruned) and tunnel mtu
269 struct ip_tunnel *tunnel; in erspan_rcv() local
279 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
290 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
295 if (tunnel) { in erspan_rcv()
310 if (tunnel->collect_md) { in erspan_rcv()
346 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
361 struct ip_tunnel *tunnel; in __ipgre_rcv() local
364 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
[all …]
H A Dip_vti.c4 * virtual tunnel interface
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()
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()
[all …]
/openbmc/linux/drivers/net/
H A 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 …]
/openbmc/linux/net/ipv6/
H A Dsit.c3 * IPv6 over IPv4 tunnel device - Simple Internet Transition (SIT)
71 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()
[all …]
H A Dip6_tunnel.c83 /* the IPv6 tunnel fallback device */
101 * ip6_tnl_lookup - fetch tunnel matching the end-point addresses
104 * @remote: the address of the tunnel exit-point
105 * @local: the address of the tunnel entry-point
108 * tunnel matching given end-points if found,
109 * else fallback tunnel if its device is up,
176 * ip6_tnl_bucket - get head of list matching given tunnel parameters
178 * @p: parameters containing tunnel end-points
184 * Return: head of IPv6 tunnel list
203 * ip6_tnl_link - add tunnel t
791 __ip6_tnl_rcv(struct ip6_tnl * tunnel,struct sk_buff * skb,const struct tnl_ptk_info * tpi,struct metadata_dst * tun_dst,int (* dscp_ecn_decapsulate)(const struct ip6_tnl * t,const struct ipv6hdr * ipv6h,struct sk_buff * skb),bool log_ecn_err) __ip6_tnl_rcv() argument
2123 struct ip6_tnl *tunnel = netdev_priv(dev); ip6_tnl_fill_info() local
2155 struct ip6_tnl *tunnel = netdev_priv(dev); ip6_tnl_get_link_net() local
[all...]
H A Dip6_vti.c66 /* the vti6 tunnel fallback device */
78 * vti6_tnl_lookup - fetch tunnel matching the end-point addresses
80 * @remote: the address of the tunnel exit-point
81 * @local: the address of the tunnel entry-point
84 * tunnel matching given end-points if found,
85 * else fallback tunnel if its device is up,
127 * vti6_tnl_bucket - get head of list matching given tunnel parameters
129 * @p: parameters containing tunnel end-points
135 * Return: head of IPv6 tunnel list
242 * vti6_locate - find or create tunnel matching given parameters
[all …]
/openbmc/linux/include/net/
H A Dip6_tunnel.h22 char name[IFNAMSIZ]; /* name of tunnel device */
24 __u8 proto; /* tunnel protocol */
25 __u8 encap_limit; /* encapsulation limit for tunnel */
26 __u8 hop_limit; /* hop limit for tunnel */
28 __be32 flowinfo; /* traffic class and flowlabel for tunnel */
29 __u32 flags; /* tunnel flags */
30 struct in6_addr laddr; /* local tunnel end-point address */
31 struct in6_addr raddr; /* remote tunnel end-point address */
45 /* IPv6 tunnel */
47 struct ip6_tnl __rcu *next; /* next tunnel in list */
[all …]
/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_tunnel.sh4 # End-to-end eBPF tunnel test suite
5 # The script tests BPF network tunnel implementation.
24 # Root namespace with metadata-mode tunnel + BPF
27 # tunnel dev <type>11, ex: gre11, IPv4: 10.1.1.200, IPv6: 1::22 (overlay)
29 # Namespace at_ns0 with native tunnel
32 # tunnel dev <type>00, ex: gre00, IPv4: 10.1.1.100, IPv6: 1::11 (overlay)
41 # 2) Tnl device's egress BPF program is triggered and set the tunnel metadata,
43 # 3) Outer tunnel header is prepended and route the packet to veth1's egress
45 # 5) Tunnel protocol handler, ex: vxlan_rcv, decap the packet
49 BPF_PIN_TUNNEL_DIR="/sys/fs/bpf/tc/tunnel"
[all …]
/openbmc/linux/drivers/net/ethernet/broadcom/bnxt/
H A Dbnxt_tc.h88 /* tunnel encap */
146 /* Tunnel encap/decap hash table
148 * the same tunnel encap/decap params (ip_daddrs, vni, udp_dport)
156 /* tunnel l2 info */
160 /* tunnel handle returned by FW */
168 * The same data-struct is used for L2-flow table and L2-tunnel table.
169 * The L2 part of a flow or tunnel is stored in a hash table.
171 * already existing flow/tunnel must refer to it's flow handle or
205 /* tunnel encap related */
208 /* tunnel decap related */
[all …]
/openbmc/phosphor-dbus-interfaces/yaml/xyz/openbmc_project/Network/Experimental/
H A DTunnel.interface.yaml15 Local endpoint of tunnel.
19 Remote endpoint of tunnel.
23 The Type Of Service byte value for a tunnel interface.
31 When true, enables Path MTU Discovery on the tunnel.
43 of an IPv6 tunnel packet.
47 The Tunnel Encapsulation Limit option specifies how many additional
65 An "ip6tnl" tunnel can be in one of three modes.
71 Possible IPv6 tunnel types.

12345678910>>...20