/kernel/linux/linux-5.10/drivers/thunderbolt/ |
H A D | tunnel.c | 13 #include "tunnel.h" 42 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ 44 struct tb_tunnel *__tunnel = (tunnel); \ 54 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ 55 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg) 56 #define tb_tunnel_warn(tunnel, fmt, arg...) \ 57 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg) 58 #define tb_tunnel_info(tunnel, fmt, arg...) \ 59 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg) 60 #define tb_tunnel_dbg(tunnel, fm 66 struct tb_tunnel *tunnel; tb_tunnel_alloc() local 86 tb_pci_activate(struct tb_tunnel *tunnel, bool activate) tb_pci_activate() argument 143 struct tb_tunnel *tunnel; tb_tunnel_discover_pci() local 221 struct tb_tunnel *tunnel; tb_tunnel_alloc_pci() local 421 tb_dp_xchg_caps(struct tb_tunnel *tunnel) tb_dp_xchg_caps() argument 507 tb_dp_activate(struct tb_tunnel *tunnel, bool active) tb_dp_activate() argument 544 tb_dp_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_dp_consumed_bandwidth() argument 656 struct tb_tunnel *tunnel; tb_tunnel_discover_dp() local 742 struct tb_tunnel *tunnel; tb_tunnel_alloc_dp() local 800 tb_dma_activate(struct tb_tunnel *tunnel, bool active) tb_dma_activate() argument 845 struct tb_tunnel *tunnel; tb_tunnel_alloc_dma() local 896 tb_usb3_init(struct tb_tunnel *tunnel) tb_usb3_init() argument 906 tb_usb3_activate(struct tb_tunnel *tunnel, bool activate) tb_usb3_activate() argument 920 tb_usb3_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_usb3_consumed_bandwidth() argument 932 tb_usb3_release_unused_bandwidth(struct tb_tunnel *tunnel) tb_usb3_release_unused_bandwidth() argument 947 tb_usb3_reclaim_available_bandwidth(struct tb_tunnel *tunnel, int *available_up, int *available_down) tb_usb3_reclaim_available_bandwidth() argument 1035 struct tb_tunnel *tunnel; tb_tunnel_discover_usb3() local 1141 struct tb_tunnel *tunnel; tb_tunnel_alloc_usb3() local 1214 tb_tunnel_free(struct tb_tunnel *tunnel) tb_tunnel_free() argument 1234 tb_tunnel_is_invalid(struct tb_tunnel *tunnel) tb_tunnel_is_invalid() argument 1253 tb_tunnel_restart(struct tb_tunnel *tunnel) tb_tunnel_restart() argument 1302 tb_tunnel_activate(struct tb_tunnel *tunnel) tb_tunnel_activate() argument 1321 tb_tunnel_deactivate(struct tb_tunnel *tunnel) tb_tunnel_deactivate() argument 1344 tb_tunnel_port_on_path(const struct tb_tunnel *tunnel, const struct tb_port *port) tb_tunnel_port_on_path() argument 1360 tb_tunnel_is_active(const struct tb_tunnel *tunnel) tb_tunnel_is_active() argument 1386 tb_tunnel_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_tunnel_consumed_bandwidth() argument 1423 tb_tunnel_release_unused_bandwidth(struct tb_tunnel *tunnel) tb_tunnel_release_unused_bandwidth() argument 1450 tb_tunnel_reclaim_available_bandwidth(struct tb_tunnel *tunnel, int *available_up, int *available_down) tb_tunnel_reclaim_available_bandwidth() argument [all...] |
H A D | tunnel.h | 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 * @activate: Optional tunnel specific activation/deactivation 31 * @consumed_bandwidth: Return how much bandwidth the tunnel consumes 35 * @type: Type of the tunnel 36 * @max_up: Maximum upstream bandwidth (Mb/s) available for the tunnel. 38 * @max_down: Maximum downstream bandwidth (Mb/s) available for the tunnel. 49 int (*init)(struct tb_tunnel *tunnel); 95 tb_tunnel_is_pci(const struct tb_tunnel *tunnel) tb_tunnel_is_pci() argument 100 tb_tunnel_is_dp(const struct tb_tunnel *tunnel) tb_tunnel_is_dp() argument 105 tb_tunnel_is_dma(const struct tb_tunnel *tunnel) tb_tunnel_is_dma() argument 110 tb_tunnel_is_usb3(const struct tb_tunnel *tunnel) tb_tunnel_is_usb3() argument [all...] |
H A D | tb.c | 16 #include "tunnel.h" 112 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() 261 struct tb_tunnel *tunnel; tb_find_tunnel() local 306 struct tb_tunnel *tunnel; tb_available_bandwidth() local 398 struct tb_tunnel *tunnel; tb_release_unused_usb3_bandwidth() local 408 struct tb_tunnel *tunnel; tb_reclaim_usb3_bandwidth() local 439 struct tb_tunnel *tunnel; tb_tunnel_usb3() local 667 tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel) tb_deactivate_and_free_tunnel() argument 717 struct tb_tunnel *tunnel; tb_free_invalid_tunnels() local 843 struct tb_tunnel *tunnel; tb_tunnel_dp() local 942 struct tb_tunnel *tunnel; tb_dp_resource_unavailable() local 989 struct tb_tunnel *tunnel, *n; tb_disconnect_and_release_dp() local 1014 struct tb_tunnel *tunnel; tb_tunnel_pci() local 1049 struct tb_tunnel *tunnel; tb_approve_xdomain_paths() local 1081 struct tb_tunnel *tunnel; __tb_disconnect_xdomain_paths() local 1246 struct tb_tunnel *tunnel; tb_stop() local 1381 struct tb_tunnel *tunnel, *n; tb_resume_noirq() local 1488 struct tb_tunnel *tunnel, *n; tb_runtime_resume() local [all...] |
/kernel/linux/linux-6.6/drivers/thunderbolt/ |
H A D | tunnel.c | 15 #include "tunnel.h" 61 #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \ 63 struct tb_tunnel *__tunnel = (tunnel); \ 73 #define tb_tunnel_WARN(tunnel, fmt, arg...) \ 74 __TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg) 75 #define tb_tunnel_warn(tunnel, fmt, arg...) \ 76 __TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg) 77 #define tb_tunnel_info(tunnel, fmt, arg...) \ 78 __TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg) 79 #define tb_tunnel_dbg(tunnel, fm 137 struct tb_tunnel *tunnel; tb_tunnel_alloc() local 157 tb_pci_set_ext_encapsulation(struct tb_tunnel *tunnel, bool enable) tb_pci_set_ext_encapsulation() argument 179 tb_pci_activate(struct tb_tunnel *tunnel, bool activate) tb_pci_activate() argument 265 struct tb_tunnel *tunnel; tb_tunnel_discover_pci() local 345 struct tb_tunnel *tunnel; tb_tunnel_alloc_pci() local 576 tb_dp_xchg_caps(struct tb_tunnel *tunnel) tb_dp_xchg_caps() argument 672 tb_dp_bandwidth_alloc_mode_enable(struct tb_tunnel *tunnel) tb_dp_bandwidth_alloc_mode_enable() argument 774 tb_dp_init(struct tb_tunnel *tunnel) tb_dp_init() argument 800 tb_dp_deinit(struct tb_tunnel *tunnel) tb_dp_deinit() argument 812 tb_dp_activate(struct tb_tunnel *tunnel, bool active) tb_dp_activate() argument 850 tb_dp_bandwidth_mode_maximum_bandwidth(struct tb_tunnel *tunnel, int *max_bw) tb_dp_bandwidth_mode_maximum_bandwidth() argument 898 tb_dp_bandwidth_mode_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_dp_bandwidth_mode_consumed_bandwidth() argument 938 tb_dp_allocated_bandwidth(struct tb_tunnel *tunnel, int *allocated_up, int *allocated_down) tb_dp_allocated_bandwidth() argument 976 tb_dp_alloc_bandwidth(struct tb_tunnel *tunnel, int *alloc_up, int *alloc_down) tb_dp_alloc_bandwidth() argument 1015 tb_dp_read_dprx(struct tb_tunnel *tunnel, u32 *rate, u32 *lanes, int timeout_msec) tb_dp_read_dprx() argument 1049 tb_dp_read_cap(struct tb_tunnel *tunnel, unsigned int cap, u32 *rate, u32 *lanes) tb_dp_read_cap() argument 1082 tb_dp_maximum_bandwidth(struct tb_tunnel *tunnel, int *max_up, int *max_down) tb_dp_maximum_bandwidth() argument 1106 tb_dp_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_dp_consumed_bandwidth() argument 1241 tb_dp_dump(struct tb_tunnel *tunnel) tb_dp_dump() argument 1297 struct tb_tunnel *tunnel; tb_tunnel_discover_dp() local 1392 struct tb_tunnel *tunnel; tb_tunnel_alloc_dp() local 1569 tb_dma_deinit(struct tb_tunnel *tunnel) tb_dma_deinit() argument 1599 struct tb_tunnel *tunnel; tb_tunnel_alloc_dma() local 1671 tb_tunnel_match_dma(const struct tb_tunnel *tunnel, int transmit_path, int transmit_ring, int receive_path, int receive_ring) tb_tunnel_match_dma() argument 1734 tb_usb3_init(struct tb_tunnel *tunnel) tb_usb3_init() argument 1744 tb_usb3_activate(struct tb_tunnel *tunnel, bool activate) tb_usb3_activate() argument 1758 tb_usb3_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_usb3_consumed_bandwidth() argument 1772 tb_usb3_release_unused_bandwidth(struct tb_tunnel *tunnel) tb_usb3_release_unused_bandwidth() argument 1787 tb_usb3_reclaim_available_bandwidth(struct tb_tunnel *tunnel, int *available_up, int *available_down) tb_usb3_reclaim_available_bandwidth() argument 1895 struct tb_tunnel *tunnel; tb_tunnel_discover_usb3() local 2001 struct tb_tunnel *tunnel; tb_tunnel_alloc_usb3() local 2074 tb_tunnel_free(struct tb_tunnel *tunnel) tb_tunnel_free() argument 2097 tb_tunnel_is_invalid(struct tb_tunnel *tunnel) tb_tunnel_is_invalid() argument 2116 tb_tunnel_restart(struct tb_tunnel *tunnel) tb_tunnel_restart() argument 2165 tb_tunnel_activate(struct tb_tunnel *tunnel) tb_tunnel_activate() argument 2184 tb_tunnel_deactivate(struct tb_tunnel *tunnel) tb_tunnel_deactivate() argument 2207 tb_tunnel_port_on_path(const struct tb_tunnel *tunnel, const struct tb_port *port) tb_tunnel_port_on_path() argument 2223 tb_tunnel_is_active(const struct tb_tunnel *tunnel) tb_tunnel_is_active() argument 2247 tb_tunnel_maximum_bandwidth(struct tb_tunnel *tunnel, int *max_up, int *max_down) tb_tunnel_maximum_bandwidth() argument 2268 tb_tunnel_allocated_bandwidth(struct tb_tunnel *tunnel, int *allocated_up, int *allocated_down) tb_tunnel_allocated_bandwidth() argument 2291 tb_tunnel_alloc_bandwidth(struct tb_tunnel *tunnel, int *alloc_up, int *alloc_down) tb_tunnel_alloc_bandwidth() argument 2315 tb_tunnel_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up, int *consumed_down) tb_tunnel_consumed_bandwidth() argument 2352 tb_tunnel_release_unused_bandwidth(struct tb_tunnel *tunnel) tb_tunnel_release_unused_bandwidth() argument 2379 tb_tunnel_reclaim_available_bandwidth(struct tb_tunnel *tunnel, int *available_up, int *available_down) tb_tunnel_reclaim_available_bandwidth() argument [all...] |
H A D | tunnel.h | 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 35 * @consumed_bandwidth: Return how much bandwidth the tunnel consume 120 tb_tunnel_is_pci(const struct tb_tunnel *tunnel) tb_tunnel_is_pci() argument 125 tb_tunnel_is_dp(const struct tb_tunnel *tunnel) tb_tunnel_is_dp() argument 130 tb_tunnel_is_dma(const struct tb_tunnel *tunnel) tb_tunnel_is_dma() argument 135 tb_tunnel_is_usb3(const struct tb_tunnel *tunnel) tb_tunnel_is_usb3() argument [all...] |
H A D | tb.c | 17 #include "tunnel.h" 99 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() 248 const struct tb_tunnel *tunnel; tb_enable_clx() local 325 tb_increase_tmu_accuracy(struct tb_tunnel *tunnel) tb_increase_tmu_accuracy() argument 392 struct tb_tunnel *tunnel = NULL; tb_switch_discover_tunnels() local 427 struct tb_tunnel *tunnel; tb_discover_tunnels() local 535 struct tb_tunnel *tunnel; tb_find_tunnel() local 580 struct tb_tunnel *tunnel; tb_available_bandwidth() local 716 struct tb_tunnel *tunnel; tb_release_unused_usb3_bandwidth() local 726 struct tb_tunnel *tunnel; tb_reclaim_usb3_bandwidth() local 757 struct tb_tunnel *tunnel; tb_tunnel_usb3() local 1020 tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel) tb_deactivate_and_free_tunnel() argument 1071 struct tb_tunnel *tunnel; tb_free_invalid_tunnels() local 1169 struct tb_tunnel *tunnel; tb_recalc_estimated_bandwidth_for_group() local 1290 struct tb_tunnel *tunnel; tb_tunnel_dp() local 1422 struct tb_tunnel *tunnel; tb_dp_resource_unavailable() local 1470 struct tb_tunnel *tunnel, *n; tb_disconnect_and_release_dp() local 1492 struct tb_tunnel *tunnel; tb_disconnect_pci() local 1515 struct tb_tunnel *tunnel; tb_tunnel_pci() local 1561 struct tb_tunnel *tunnel; tb_approve_xdomain_paths() local 1610 struct tb_tunnel *tunnel, *n; __tb_disconnect_xdomain_paths() local 1768 tb_alloc_dp_bandwidth(struct tb_tunnel *tunnel, int *requested_up, int *requested_down) tb_alloc_dp_bandwidth() argument 1889 struct tb_tunnel *tunnel; tb_handle_dp_bandwidth_request() local 2047 struct tb_tunnel *tunnel; tb_stop() local 2197 struct tb_tunnel *tunnel, *n; tb_resume_noirq() local 2329 struct tb_tunnel *tunnel, *n; tb_runtime_resume() local [all...] |
H A D | test.c | 13 #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 in tb_test_tunnel_dp() 1431 struct tb_tunnel *tunnel; tb_test_tunnel_dp_chain() local 1477 struct tb_tunnel *tunnel; tb_test_tunnel_dp_tree() local 1528 struct tb_tunnel *tunnel; tb_test_tunnel_dp_max_length() local 1792 struct tb_tunnel *tunnel; tb_test_tunnel_dma() local 1835 struct tb_tunnel *tunnel; tb_test_tunnel_dma_rx() local 1872 struct tb_tunnel *tunnel; tb_test_tunnel_dma_tx() local 1910 struct tb_tunnel *tunnel; tb_test_tunnel_dma_chain() local 1975 struct tb_tunnel *tunnel; tb_test_tunnel_dma_match() local 2027 struct tb_tunnel *tunnel; tb_test_credit_alloc_legacy_not_bonded() local 2060 struct tb_tunnel *tunnel; tb_test_credit_alloc_legacy_bonded() local 2093 struct tb_tunnel *tunnel; tb_test_credit_alloc_pcie() local 2126 struct tb_tunnel *tunnel; tb_test_credit_alloc_without_dp() local 2176 struct tb_tunnel *tunnel; tb_test_credit_alloc_dp() local 2220 struct tb_tunnel *tunnel; tb_test_credit_alloc_usb3() local 2253 struct tb_tunnel *tunnel; tb_test_credit_alloc_dma() local [all...] |
/kernel/linux/linux-5.10/net/l2tp/ |
H A D | l2tp_core.c | 146 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() 155 /* the tunnel is freed in the socket destructor */ 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() 178 l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel) l2tp_tunnel_inc_refcount() argument 184 l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel) l2tp_tunnel_dec_refcount() argument 208 struct l2tp_tunnel *tunnel; l2tp_tunnel_get() local 226 struct l2tp_tunnel *tunnel; l2tp_tunnel_get_nth() local 243 l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel, u32 session_id) l2tp_tunnel_get_session() argument 286 l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth) l2tp_session_get_nth() argument 337 l2tp_session_register(struct l2tp_session *session, struct l2tp_tunnel *tunnel) l2tp_session_register() argument 433 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_recv_dequeue_skb() local 644 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_recv_common() local 794 l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb) l2tp_udp_recv_core() argument 898 struct l2tp_tunnel *tunnel; l2tp_udp_encap_recv() local 930 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_build_l2tpv2_header() local 957 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_build_l2tpv3_header() local 996 l2tp_xmit_queue(struct l2tp_tunnel *tunnel, struct sk_buff *skb, struct flowi *fl) l2tp_xmit_queue() argument 1014 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_xmit_core() local 1133 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); l2tp_tunnel_destruct() local 1168 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_session_unhash() local 1191 l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) l2tp_tunnel_closeall() argument 1224 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); l2tp_udp_encap_destroy() local 1230 l2tp_tunnel_remove(struct net *net, struct l2tp_tunnel *tunnel) l2tp_tunnel_remove() argument 1242 struct l2tp_tunnel *tunnel = container_of(work, struct l2tp_tunnel, l2tp_tunnel_del_work() local 1393 struct l2tp_tunnel *tunnel = NULL; l2tp_tunnel_create() local 1456 l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) l2tp_tunnel_register() argument 1540 l2tp_tunnel_delete(struct l2tp_tunnel *tunnel) l2tp_tunnel_delete() argument 1583 l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) l2tp_session_create() argument 1661 struct l2tp_tunnel *tunnel = NULL; l2tp_exit_net() local [all...] |
H A D | l2tp_debugfs.c | 36 int tunnel_idx; /* current tunnel */ 37 int session_idx; /* index of session within current tunnel */ 38 struct l2tp_tunnel *tunnel; member 39 struct l2tp_session *session; /* NULL means get next tunnel */ 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() 86 /* NULL tunnel an in l2tp_dfs_seq_start() 122 struct l2tp_tunnel *tunnel = v; l2tp_dfs_seq_tunnel_show() local [all...] |
H A D | l2tp_ppp.c | 27 * zero, the socket is treated as a special tunnel management socket. 151 /* Helpers to obtain tunnel/session contexts from sockets. 273 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local 280 /* Get session and tunnel contexts */ in pppol2tp_sendmsg() 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 356 /* Get session and tunnel contexts from the socket */ in pppol2tp_xmit() 361 tunnel in pppol2tp_xmit() 643 pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) pppol2tp_tunnel_mtu() argument 658 struct l2tp_tunnel *tunnel; pppol2tp_tunnel_get() local 722 struct l2tp_tunnel *tunnel; pppol2tp_connect() local 863 pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) pppol2tp_session_create() argument 909 struct l2tp_tunnel *tunnel; pppol2tp_getname() local 1036 pppol2tp_tunnel_copy_stats(struct pppol2tp_ioc_stats *stats, struct l2tp_tunnel *tunnel) pppol2tp_tunnel_copy_stats() argument 1159 pppol2tp_tunnel_setsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int val) pppol2tp_tunnel_setsockopt() argument 1244 struct l2tp_tunnel *tunnel; pppol2tp_setsockopt() local 1283 pppol2tp_tunnel_getsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int *val) pppol2tp_tunnel_getsockopt() argument 1350 struct l2tp_tunnel *tunnel; pppol2tp_getsockopt() local 1416 struct l2tp_tunnel *tunnel; global() member 1511 struct l2tp_tunnel *tunnel = v; pppol2tp_seq_tunnel_show() local 1530 struct l2tp_tunnel *tunnel = session->tunnel; pppol2tp_seq_session_show() local [all...] |
H A D | l2tp_netlink.c | 38 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() 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 socke in l2tp_nl_cmd_tunnel_create() 102 l2tp_tunnel_notify(struct genl_family *family, struct genl_info *info, struct l2tp_tunnel *tunnel, u8 cmd) l2tp_tunnel_notify() argument 260 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_delete() local 290 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_modify() local 370 l2tp_nl_tunnel_send_addr(struct sk_buff *skb, struct l2tp_tunnel *tunnel) l2tp_nl_tunnel_send_addr() argument 384 l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int flags, struct l2tp_tunnel *tunnel, u8 cmd) l2tp_nl_tunnel_send() argument 451 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_get() local 496 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_dump() local 527 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_session_create() local 717 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_nl_session_send() local 833 struct l2tp_tunnel *tunnel = NULL; l2tp_nl_cmd_session_dump() local [all...] |
H A D | trace.h | 28 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 [all...] |
H A D | l2tp_core.h | 18 /* 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 instanc 293 l2tp_tunnel_dst_mtu(const struct l2tp_tunnel *tunnel) l2tp_tunnel_dst_mtu() argument 309 l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel) l2tp_tunnel_uses_xfrm() argument 317 l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel) l2tp_tunnel_uses_xfrm() argument [all...] |
/kernel/linux/linux-6.6/net/l2tp/ |
H A D | l2tp_core.c | 146 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() 155 /* the tunnel is freed in the socket destructor */ 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() 178 l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel) l2tp_tunnel_inc_refcount() argument 184 l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel) l2tp_tunnel_dec_refcount() argument 208 struct l2tp_tunnel *tunnel; l2tp_tunnel_get() local 226 struct l2tp_tunnel *tunnel; l2tp_tunnel_get_nth() local 243 l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel, u32 session_id) l2tp_tunnel_get_session() argument 286 l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth) l2tp_session_get_nth() argument 337 l2tp_session_register(struct l2tp_session *session, struct l2tp_tunnel *tunnel) l2tp_session_register() argument 433 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_recv_dequeue_skb() local 644 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_recv_common() local 794 l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb) l2tp_udp_recv_core() argument 898 struct l2tp_tunnel *tunnel; l2tp_udp_encap_recv() local 930 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_build_l2tpv2_header() local 957 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_build_l2tpv3_header() local 996 l2tp_xmit_queue(struct l2tp_tunnel *tunnel, struct sk_buff *skb, struct flowi *fl) l2tp_xmit_queue() argument 1014 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_xmit_core() local 1133 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); l2tp_tunnel_destruct() local 1168 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_session_unhash() local 1192 l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) l2tp_tunnel_closeall() argument 1222 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); l2tp_udp_encap_destroy() local 1228 l2tp_tunnel_remove(struct net *net, struct l2tp_tunnel *tunnel) l2tp_tunnel_remove() argument 1240 struct l2tp_tunnel *tunnel = container_of(work, struct l2tp_tunnel, l2tp_tunnel_del_work() local 1391 struct l2tp_tunnel *tunnel = NULL; l2tp_tunnel_create() local 1454 l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) l2tp_tunnel_register() argument 1538 l2tp_tunnel_delete(struct l2tp_tunnel *tunnel) l2tp_tunnel_delete() argument 1581 l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) l2tp_session_create() argument 1659 struct l2tp_tunnel *tunnel = NULL; l2tp_exit_net() local [all...] |
H A D | l2tp_ppp.c | 27 * 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 in pppol2tp_xmit() 642 pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) pppol2tp_tunnel_mtu() argument 657 struct l2tp_tunnel *tunnel; pppol2tp_tunnel_get() local 721 struct l2tp_tunnel *tunnel; pppol2tp_connect() local 862 pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg) pppol2tp_session_create() argument 908 struct l2tp_tunnel *tunnel; pppol2tp_getname() local 1035 pppol2tp_tunnel_copy_stats(struct pppol2tp_ioc_stats *stats, struct l2tp_tunnel *tunnel) pppol2tp_tunnel_copy_stats() argument 1158 pppol2tp_tunnel_setsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int val) pppol2tp_tunnel_setsockopt() argument 1243 struct l2tp_tunnel *tunnel; pppol2tp_setsockopt() local 1282 pppol2tp_tunnel_getsockopt(struct sock *sk, struct l2tp_tunnel *tunnel, int optname, int *val) pppol2tp_tunnel_getsockopt() argument 1349 struct l2tp_tunnel *tunnel; pppol2tp_getsockopt() local 1415 struct l2tp_tunnel *tunnel; global() member 1510 struct l2tp_tunnel *tunnel = v; pppol2tp_seq_tunnel_show() local 1529 struct l2tp_tunnel *tunnel = session->tunnel; pppol2tp_seq_session_show() local [all...] |
H A D | l2tp_debugfs.c | 37 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 an in l2tp_dfs_seq_start() 123 struct l2tp_tunnel *tunnel = v; l2tp_dfs_seq_tunnel_show() local [all...] |
H A D | l2tp_netlink.c | 38 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() 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 socke in l2tp_nl_cmd_tunnel_create() 102 l2tp_tunnel_notify(struct genl_family *family, struct genl_info *info, struct l2tp_tunnel *tunnel, u8 cmd) l2tp_tunnel_notify() argument 260 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_delete() local 290 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_modify() local 370 l2tp_nl_tunnel_send_addr(struct sk_buff *skb, struct l2tp_tunnel *tunnel) l2tp_nl_tunnel_send_addr() argument 384 l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int flags, struct l2tp_tunnel *tunnel, u8 cmd) l2tp_nl_tunnel_send() argument 451 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_get() local 496 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_tunnel_dump() local 527 struct l2tp_tunnel *tunnel; l2tp_nl_cmd_session_create() local 717 struct l2tp_tunnel *tunnel = session->tunnel; l2tp_nl_session_send() local 833 struct l2tp_tunnel *tunnel = NULL; l2tp_nl_cmd_session_dump() local [all...] |
H A D | trace.h | 28 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 [all...] |
H A D | l2tp_core.h | 18 /* 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 instanc 293 l2tp_tunnel_dst_mtu(const struct l2tp_tunnel *tunnel) l2tp_tunnel_dst_mtu() argument 309 l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel) l2tp_tunnel_uses_xfrm() argument 317 l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel) l2tp_tunnel_uses_xfrm() argument [all...] |
/kernel/linux/linux-6.6/drivers/net/ |
H A D | amt.c | 121 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, grou in amt_lookup_group() 226 struct amt_tunnel_list *tunnel; amt_destroy_source() local 294 struct amt_tunnel_list *tunnel; amt_source_work() local 313 amt_act_src(struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, struct amt_source_node *snode, enum amt_act act) amt_act_src() argument 413 struct amt_tunnel_list *tunnel = gnode->tunnel_list; amt_group_work() local 463 amt_add_group(struct amt_dev *amt, struct amt_tunnel_list *tunnel, union amt_addr *group, union amt_addr *host, bool v6) amt_add_group() argument 590 __amt_update_relay_status(struct amt_tunnel_list *tunnel, enum amt_status status, bool validate) __amt_update_relay_status() argument 603 amt_update_relay_status(struct amt_tunnel_list *tunnel, enum amt_status status, bool validate) amt_update_relay_status() argument 790 amt_send_igmp_gq(struct amt_dev *amt, struct amt_tunnel_list *tunnel) amt_send_igmp_gq() argument 876 amt_send_mld_gq(struct amt_dev *amt, struct amt_tunnel_list *tunnel) amt_send_mld_gq() argument 888 amt_send_mld_gq(struct amt_dev *amt, struct amt_tunnel_list *tunnel) amt_send_mld_gq() argument 1054 amt_send_multicast_data(struct amt_dev *amt, const struct sk_buff *oskb, struct amt_tunnel_list *tunnel, bool v6) amt_send_multicast_data() argument 1109 amt_send_membership_query(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel, bool v6) amt_send_membership_query() argument 1172 struct amt_tunnel_list *tunnel; amt_dev_xmit() local 1319 amt_clear_groups(struct amt_tunnel_list *tunnel) amt_clear_groups() argument 1337 struct amt_tunnel_list *tunnel = container_of(to_delayed_work(work), amt_tunnel_expire() local 1352 amt_cleanup_srcs(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode) amt_cleanup_srcs() argument 1388 amt_add_srcs(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, bool v6) amt_add_srcs() argument 1468 amt_lookup_act_srcs(struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, enum amt_ops ops, enum amt_filter filter, enum amt_act act, bool v6) amt_lookup_act_srcs() argument 1592 amt_mcast_is_in_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_is_in_handler() argument 1645 amt_mcast_is_ex_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_is_ex_handler() argument 1709 amt_mcast_to_in_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_to_in_handler() argument 1770 amt_mcast_to_ex_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_to_ex_handler() argument 1836 amt_mcast_allow_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_allow_handler() argument 1881 amt_mcast_block_handler(struct amt_dev *amt, struct amt_tunnel_list *tunnel, struct amt_group_node *gnode, void *grec, void *zero_grec, bool v6) amt_mcast_block_handler() argument 1937 amt_igmpv2_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_igmpv2_report_handler() argument 1974 amt_igmpv2_leave_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_igmpv2_leave_handler() argument 1992 amt_igmpv3_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_igmpv3_report_handler() argument 2063 amt_igmp_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_igmp_report_handler() argument 2098 amt_mldv1_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_mldv1_report_handler() argument 2135 amt_mldv1_leave_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_mldv1_leave_handler() argument 2154 amt_mldv2_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_mldv2_report_handler() argument 2225 amt_mld_report_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) amt_mld_report_handler() argument 2449 struct amt_tunnel_list *tunnel; amt_update_handler() local 2661 struct amt_tunnel_list *tunnel; amt_request_handler() local 3016 struct amt_tunnel_list *tunnel, *tmp; amt_dev_stop() local [all...] |
/kernel/linux/linux-6.6/net/ipv6/ |
H A D | sit.c | 3 * 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, v6add in is_spoofed_6rd() 624 only_dnatted(const struct ip_tunnel *tunnel, const struct in6_addr *v6dst) only_dnatted() argument 639 packet_is_spoofed(struct sk_buff *skb, const struct iphdr *iph, struct ip_tunnel *tunnel) packet_is_spoofed() argument 679 struct ip_tunnel *tunnel; ipip6_rcv() local 752 struct ip_tunnel *tunnel; sit_tunnel_rcv() local 805 check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, __be32 *v4dst) check_6rd() argument 840 try_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst) try_6rd() argument 856 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_xmit() local 1049 struct ip_tunnel *tunnel = netdev_priv(dev); sit_tunnel_xmit__() local 1098 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_bind_dev() local 1408 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_dev_free() local 1422 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_setup() local 1444 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_init() local 1468 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_fb_tunnel_init() local 1693 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_fill_info() local [all...] |
/kernel/linux/linux-5.10/net/ipv6/ |
H A D | sit.c | 3 * IPv6 over IPv4 tunnel device - Simple Internet Transition (SIT) 71 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() 609 /* Checks if an address matches an address on the tunnel interfac 621 only_dnatted(const struct ip_tunnel *tunnel, const struct in6_addr *v6dst) only_dnatted() argument 636 packet_is_spoofed(struct sk_buff *skb, const struct iphdr *iph, struct ip_tunnel *tunnel) packet_is_spoofed() argument 676 struct ip_tunnel *tunnel; ipip6_rcv() local 753 struct ip_tunnel *tunnel; sit_tunnel_rcv() local 804 check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, __be32 *v4dst) check_6rd() argument 839 try_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst) try_6rd() argument 855 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_xmit() local 1048 struct ip_tunnel *tunnel = netdev_priv(dev); sit_tunnel_xmit__() local 1097 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_bind_dev() local 1405 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_dev_free() local 1419 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_setup() local 1441 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_tunnel_init() local 1465 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_fb_tunnel_init() local 1749 struct ip_tunnel *tunnel = netdev_priv(dev); ipip6_fill_info() local [all...] |
/kernel/linux/linux-5.10/net/ipv4/ |
H A D | ip_tunnel.c | 72 /* Fallback tunnel: no source, no destination, no key, no options 76 it will match only tunnel with the same key; if it is not present, 77 it will match only keyless tunnel. 80 will match fallback tunnel. 81 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() 282 struct ip_tunnel *tunnel in ip_tunnel_bind_dev() local 362 ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, bool log_ecn_error) ip_tunnel_rcv() argument 502 struct ip_tunnel *tunnel = netdev_priv(dev); tnl_update_pmtu() local 573 struct ip_tunnel *tunnel = netdev_priv(dev); ip_md_tunnel_xmit() local 666 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_xmit() local 1004 struct ip_tunnel *tunnel = netdev_priv(dev); __ip_tunnel_change_mtu() local 1034 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_dev_free() local 1043 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_dellink() local 1057 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_get_link_net() local 1065 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_get_iflink() local 1212 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_changelink() local 1248 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_init() local 1285 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_uninit() local 1301 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_setup() local [all...] |
/kernel/linux/linux-6.6/net/ipv4/ |
H A D | ip_tunnel.c | 72 /* Fallback tunnel: no source, no destination, no key, no options 76 it will match only tunnel with the same key; if it is not present, 77 it will match only keyless tunnel. 80 will match fallback tunnel. 81 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() 282 struct ip_tunnel *tunnel in ip_tunnel_bind_dev() local 376 ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, bool log_ecn_error) ip_tunnel_rcv() argument 516 struct ip_tunnel *tunnel = netdev_priv(dev); tnl_update_pmtu() local 587 struct ip_tunnel *tunnel = netdev_priv(dev); ip_md_tunnel_xmit() local 685 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_xmit() local 1026 struct ip_tunnel *tunnel = netdev_priv(dev); __ip_tunnel_change_mtu() local 1056 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_dev_free() local 1065 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_dellink() local 1079 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_get_link_net() local 1087 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_get_iflink() local 1234 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_changelink() local 1270 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_init() local 1307 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_uninit() local 1323 struct ip_tunnel *tunnel = netdev_priv(dev); ip_tunnel_setup() local [all...] |
H A D | ipip.c | 22 /* 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 inf 217 struct ip_tunnel *tunnel; ipip_tunnel_rcv() local 277 struct ip_tunnel *tunnel = netdev_priv(dev); ipip_tunnel_xmit() local 382 struct ip_tunnel *tunnel = netdev_priv(dev); ipip_tunnel_init() local 512 struct ip_tunnel *tunnel = netdev_priv(dev); ipip_fill_info() local [all...] |