/linux-6.1.9/tools/testing/selftests/bpf/progs/ |
D | test_cls_redirect.c | 378 static INLINING ret_t accept_locally(struct __sk_buff *skb, encap_headers_t *encap) in accept_locally() argument 381 sizeof(*encap) + in accept_locally() 382 sizeof(struct in_addr) * encap->unigue.hop_count; in accept_locally() 386 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in accept_locally() 387 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 399 static INLINING ret_t forward_with_gre(struct __sk_buff *skb, encap_headers_t *encap, in forward_with_gre() argument 405 sizeof(*encap) + in forward_with_gre() 406 sizeof(struct in_addr) * encap->unigue.hop_count; in forward_with_gre() 419 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in forward_with_gre() 526 static INLINING ret_t forward_to_next_hop(struct __sk_buff *skb, encap_headers_t *encap, in forward_to_next_hop() argument [all …]
|
/linux-6.1.9/net/bridge/netfilter/ |
D | ebt_vlan.c | 34 __be16 encap; in ebt_vlan_mt() local 38 encap = skb->protocol; in ebt_vlan_mt() 48 encap = fp->h_vlan_encapsulated_proto; in ebt_vlan_mt() 72 EXIT_ON_MISMATCH(encap, EBT_VLAN_ENCAP); in ebt_vlan_mt() 141 if ((unsigned short) ntohs(info->encap) < ETH_ZLEN) { in ebt_vlan_mt_check() 143 "minimal\n", ntohs(info->encap)); in ebt_vlan_mt_check()
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | tc_tun_encap.c | 747 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_tbl_get_last_update() local 752 encap = uplink_priv->encap; in mlx5e_route_tbl_get_last_update() 754 spin_lock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 755 ret = encap->route_tbl_last_update; in mlx5e_route_tbl_get_last_update() 756 spin_unlock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 1042 mlx5e_route_get(struct mlx5e_tc_tun_encap *encap, struct mlx5e_route_key *key, in mlx5e_route_get() argument 1048 hash_for_each_possible(encap->route_tbl, r, hlist, hash_key) { in mlx5e_route_get() 1066 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_get_create() local 1072 encap = uplink_priv->encap; in mlx5e_route_get_create() 1075 spin_lock_bh(&encap->route_lock); in mlx5e_route_get_create() [all …]
|
/linux-6.1.9/net/ipv4/ |
D | esp4.c | 136 struct xfrm_encap_tmpl *encap = x->encap; in esp_find_tcp_sk() local 148 sport = encap->encap_sport; in esp_find_tcp_sk() 149 dport = encap->encap_dport; in esp_find_tcp_sk() 177 if (encap->encap_sport != sport || in esp_find_tcp_sk() 178 encap->encap_dport != dport) { in esp_find_tcp_sk() 278 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) in esp_output_done() 412 struct xfrm_encap_tmpl *encap = x->encap; in esp_output_encap() local 418 sport = encap->encap_sport; in esp_output_encap() 419 dport = encap->encap_dport; in esp_output_encap() 420 encap_type = encap->encap_type; in esp_output_encap() [all …]
|
/linux-6.1.9/net/ipv6/ |
D | esp6.c | 153 struct xfrm_encap_tmpl *encap = x->encap; in esp6_find_tcp_sk() local 165 sport = encap->encap_sport; in esp6_find_tcp_sk() 166 dport = encap->encap_dport; in esp6_find_tcp_sk() 194 if (encap->encap_sport != sport || in esp6_find_tcp_sk() 195 encap->encap_dport != dport) { in esp6_find_tcp_sk() 314 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) in esp_output_done() 448 struct xfrm_encap_tmpl *encap = x->encap; in esp6_output_encap() local 454 sport = encap->encap_sport; in esp6_output_encap() 455 dport = encap->encap_dport; in esp6_output_encap() 456 encap_type = encap->encap_type; in esp6_output_encap() [all …]
|
D | ip6_offload.c | 85 bool encap, udpfrag; in ipv6_gso_segment() local 116 encap = SKB_GSO_CB(skb)->encap_level > 0; in ipv6_gso_segment() 117 if (encap) in ipv6_gso_segment() 129 udpfrag = proto == IPPROTO_UDP && encap && in ipv6_gso_segment() 173 if (encap) in ipv6_gso_segment()
|
/linux-6.1.9/net/netfilter/ |
D | nft_flow_offload.c | 86 } encap[NF_FLOW_TABLE_ENCAP_MAX]; member 128 info->encap[info->num_encaps].id = path->encap.id; in nft_dev_path_info() 129 info->encap[info->num_encaps].proto = path->encap.proto; in nft_dev_path_info() 132 memcpy(info->h_dest, path->encap.h_dest, ETH_ALEN); in nft_dev_path_info() 143 info->encap[info->num_encaps].id = path->bridge.vlan_id; in nft_dev_path_info() 144 info->encap[info->num_encaps].proto = path->bridge.vlan_proto; in nft_dev_path_info() 206 route->tuple[!dir].in.encap[i].id = info.encap[i].id; in nft_dev_forward_path() 207 route->tuple[!dir].in.encap[i].proto = info.encap[i].proto; in nft_dev_forward_path()
|
D | nf_flow_table_offload.c | 120 tuple->encap[0].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_match() 123 tuple->encap[0].id, in nf_flow_rule_match() 124 tuple->encap[0].proto); in nf_flow_rule_match() 129 tuple->encap[1].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_match() 134 tuple->encap[1].id, in nf_flow_rule_match() 135 tuple->encap[1].proto); in nf_flow_rule_match() 140 tuple->encap[1].id, in nf_flow_rule_match() 141 tuple->encap[1].proto); in nf_flow_rule_match() 650 if (tuple->encap[i].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_route_common() 666 switch (other_tuple->encap[i].proto) { in nf_flow_rule_route_common() [all …]
|
/linux-6.1.9/include/net/ |
D | ip6_tunnel.h | 65 struct ip_tunnel_encap encap; member 115 if (t->encap.type == TUNNEL_ENCAP_NONE) in ip6_tnl_encap() 118 if (t->encap.type >= MAX_IPTUN_ENCAP_OPS) in ip6_tnl_encap() 122 ops = rcu_dereference(ip6tun_encaps[t->encap.type]); in ip6_tnl_encap() 124 ret = ops->build_header(skb, &t->encap, protocol, fl6); in ip6_tnl_encap()
|
D | ip_tunnels.h | 136 struct ip_tunnel_encap encap; member 306 struct ip_tunnel_encap *encap); 380 if (t->encap.type == TUNNEL_ENCAP_NONE) in ip_tunnel_encap() 383 if (t->encap.type >= MAX_IPTUN_ENCAP_OPS) in ip_tunnel_encap() 387 ops = rcu_dereference(iptun_encaps[t->encap.type]); in ip_tunnel_encap() 389 ret = ops->build_header(skb, &t->encap, protocol, fl4); in ip_tunnel_encap()
|
D | lwtunnel.h | 37 int (*build_state)(struct net *net, struct nlattr *encap, 120 struct nlattr *encap, 216 struct nlattr *encap, in lwtunnel_build_state() argument
|
/linux-6.1.9/tools/testing/selftests/net/ |
D | srv6_hencap_red_l3vpn_test.sh | 425 encap seg6local action End dev "${VRF_DEVNAME}" 431 encap seg6local action End.DT46 vrftable "${VRF_TID}" \ 484 encap seg6 mode "${mode}" segs "${policy}" \ 495 encap seg6 mode "${mode}" segs "${policy}" \ 618 setup_rt_policy_ipv6 2 1 "3 4" 2 encap.red 619 setup_rt_policy_ipv6 1 2 "" 1 encap.red 631 setup_rt_policy_ipv4 2 1 "" 2 encap.red 632 setup_rt_policy_ipv4 1 2 "4 3" 1 encap.red 645 setup_rt_policy_ipv6 4 3 "2" 4 encap.red 646 setup_rt_policy_ipv6 3 4 "1" 3 encap.red
|
D | pmtu.sh | 410 encap="${3}" 439 …cmd ${ns_a} ip link add ${encap}_a type ${type} ${mode} local ${a_addr} remote ${b_addr} encap ${e… 442 …cmd ${ns_b} ip link add ${encap}_b type ${type} ${mode} local ${b_addr} remote ${a_addr} encap ${e… 445 run_cmd ${ns_a} ip addr add ${tunnel4_a_addr}/${tunnel4_mask} dev ${encap}_a 446 run_cmd ${ns_b} ip addr add ${tunnel4_b_addr}/${tunnel4_mask} dev ${encap}_b 448 run_cmd ${ns_a} ip addr add ${tunnel6_a_addr}/${tunnel6_mask} dev ${encap}_a 449 run_cmd ${ns_b} ip addr add ${tunnel6_b_addr}/${tunnel6_mask} dev ${encap}_b 452 run_cmd ${ns_a} ip link set ${encap}_a up 453 run_cmd ${ns_b} ip link set ${encap}_b up 675 encap=${4} [all …]
|
D | ioam6.sh | 219 ip -netns ioam-tmp-node route add db02::/64 encap ioam6 mode inline \ 493 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 513 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 539 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 578 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 608 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 628 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 654 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 683 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ 707 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 mode $mode \ [all …]
|
D | srv6_end_dt46_l3vpn_test.sh | 347 encap seg6 mode encap segs ${vpn_sid} dev veth0 349 encap seg6 mode encap segs ${vpn_sid} dev veth0 356 encap seg6local action End.DT46 vrftable ${tid} dev vrf-${tid}
|
/linux-6.1.9/net/l2tp/ |
D | l2tp_core.c | 371 (session_walk->tunnel->encap == L2TP_ENCAPTYPE_IP || in l2tp_session_register() 372 tunnel->encap == L2TP_ENCAPTYPE_IP)) { in l2tp_session_register() 964 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_build_l2tpv3_header() 1026 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core() 1066 switch (tunnel->encap) { in l2tp_xmit_core() 1139 switch (tunnel->encap) { in l2tp_tunnel_destruct() 1284 switch (cfg->encap) { in l2tp_tunnel_sock_create() 1393 enum l2tp_encap_type encap = L2TP_ENCAPTYPE_UDP; in l2tp_tunnel_create() local 1396 encap = cfg->encap; in l2tp_tunnel_create() 1413 tunnel->encap = encap; in l2tp_tunnel_create() [all …]
|
D | trace.h | 60 __field(enum l2tp_encap_type, encap) 68 __entry->encap = tunnel->encap; 73 show_encap_type_name(__entry->encap),
|
D | l2tp_netlink.c | 218 cfg.encap = nla_get_u16(attrs[L2TP_ATTR_ENCAP_TYPE]); in l2tp_nl_cmd_tunnel_create() 233 switch (cfg.encap) { in l2tp_nl_cmd_tunnel_create() 318 enum l2tp_encap_type encap) in l2tp_nl_tunnel_send_addr6() argument 323 switch (encap) { in l2tp_nl_tunnel_send_addr6() 346 enum l2tp_encap_type encap) in l2tp_nl_tunnel_send_addr4() argument 350 switch (encap) { in l2tp_nl_tunnel_send_addr4() 379 return l2tp_nl_tunnel_send_addr6(skb, sk, tunnel->encap); in l2tp_nl_tunnel_send_addr() 381 return l2tp_nl_tunnel_send_addr4(skb, sk, tunnel->encap); in l2tp_nl_tunnel_send_addr() 398 nla_put_u16(skb, L2TP_ATTR_ENCAP_TYPE, tunnel->encap)) in l2tp_nl_tunnel_send()
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ipsec_rxtx.c | 220 struct xfrm_encap_tmpl *encap; in mlx5e_ipsec_tx_build_eseg() local 246 encap = x->encap; in mlx5e_ipsec_tx_build_eseg() 247 if (!encap) { in mlx5e_ipsec_tx_build_eseg() 251 } else if (encap->encap_type == UDP_ENCAP_ESPINUDP) { in mlx5e_ipsec_tx_build_eseg()
|
/linux-6.1.9/net/xfrm/ |
D | xfrm_state.c | 434 .encap = XFRM_MODE_BEET, 439 .encap = XFRM_MODE_TRANSPORT, 443 .encap = XFRM_MODE_TUNNEL, 451 .encap = XFRM_MODE_BEET, 456 .encap = XFRM_MODE_ROUTEOPTIMIZATION, 460 .encap = XFRM_MODE_TRANSPORT, 464 .encap = XFRM_MODE_TUNNEL, 470 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument 474 if (unlikely(encap >= XFRM_MODE_MAX)) in xfrm_get_mode() 479 mode = &xfrm4_mode_map[encap]; in xfrm_get_mode() [all …]
|
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/ |
D | cls_redirect.c | 249 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in encap_init() argument 253 *encap = (encap_headers_t){ in encap_init() 279 encap_headers_t encap; in build_input() local 292 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in build_input() 293 p = mempcpy(p, &encap, sizeof(encap)); in build_input()
|
/linux-6.1.9/net/core/ |
D | lwtunnel.c | 112 struct nlattr *encap, unsigned int family, in lwtunnel_build_state() argument 122 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state() 135 ret = ops->build_state(net, encap, family, cfg, lws, extack); in lwtunnel_build_state() 142 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state()
|
/linux-6.1.9/tools/testing/selftests/bpf/ |
D | test_lwt_ip_encap.sh | 376 ip -netns ${NS1} route add ${IPv4_DST} encap bpf xmit obj \ 378 ip -netns ${NS1} -6 route add ${IPv6_DST} encap bpf xmit obj \ 381 ip -netns ${NS1} route add ${IPv4_DST} encap bpf xmit obj \ 383 ip -netns ${NS1} -6 route add ${IPv6_DST} encap bpf xmit obj \ 434 ip -netns ${NS2} route add ${IPv4_DST} encap bpf in obj \ 436 ip -netns ${NS2} -6 route add ${IPv6_DST} encap bpf in obj \ 439 ip -netns ${NS2} route add ${IPv4_DST} encap bpf in obj \ 441 ip -netns ${NS2} -6 route add ${IPv6_DST} encap bpf in obj \
|
D | test_lwt_seg6local.sh | 121 ip netns exec ${NS2} ip -6 route add fb00::6 encap bpf in obj ${BPF_FILE} sec encap_srh dev veth2 125 ip netns exec ${NS3} ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj ${BPF_FILE… 127 ip netns exec ${NS4} ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj ${BPF_FILE… 132 ip netns exec ${NS5} ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj ${BPF_FILE…
|
/linux-6.1.9/tools/testing/selftests/net/forwarding/ |
D | ipip_lib.sh | 336 local encap=$1; shift 341 check_fail $? "ping $encap should not pass with size 1800" 348 log_test "ping $encap packet size 1800 after MTU change"
|