| /Linux-v5.15/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-v5.15/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-v5.15/drivers/net/ethernet/mellanox/mlx5/core/en/ |
| D | tc_tun_encap.c | 691 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_tbl_get_last_update() local 696 encap = uplink_priv->encap; in mlx5e_route_tbl_get_last_update() 698 spin_lock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 699 ret = encap->route_tbl_last_update; in mlx5e_route_tbl_get_last_update() 700 spin_unlock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 975 mlx5e_route_get(struct mlx5e_tc_tun_encap *encap, struct mlx5e_route_key *key, in mlx5e_route_get() argument 981 hash_for_each_possible(encap->route_tbl, r, hlist, hash_key) { in mlx5e_route_get() 999 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_get_create() local 1005 encap = uplink_priv->encap; in mlx5e_route_get_create() 1008 spin_lock_bh(&encap->route_lock); in mlx5e_route_get_create() [all …]
|
| /Linux-v5.15/net/netfilter/ |
| D | nft_flow_offload.c | 73 } encap[NF_FLOW_TABLE_ENCAP_MAX]; member 123 info->encap[info->num_encaps].id = path->encap.id; in nft_dev_path_info() 124 info->encap[info->num_encaps].proto = path->encap.proto; in nft_dev_path_info() 127 memcpy(info->h_dest, path->encap.h_dest, ETH_ALEN); in nft_dev_path_info() 138 info->encap[info->num_encaps].id = path->bridge.vlan_id; in nft_dev_path_info() 139 info->encap[info->num_encaps].proto = path->bridge.vlan_proto; in nft_dev_path_info() 201 route->tuple[!dir].in.encap[i].id = info.encap[i].id; in nft_dev_forward_path() 202 route->tuple[!dir].in.encap[i].proto = info.encap[i].proto; in nft_dev_forward_path()
|
| D | nf_flow_table_offload.c | 117 tuple->encap[0].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_match() 120 tuple->encap[0].id, in nf_flow_rule_match() 121 tuple->encap[0].proto); in nf_flow_rule_match() 126 tuple->encap[1].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_match() 131 tuple->encap[1].id, in nf_flow_rule_match() 132 tuple->encap[1].proto); in nf_flow_rule_match() 137 tuple->encap[1].id, in nf_flow_rule_match() 138 tuple->encap[1].proto); in nf_flow_rule_match() 639 if (tuple->encap[i].proto == htons(ETH_P_8021Q)) { in nf_flow_rule_route_common() 655 switch (other_tuple->encap[i].proto) { in nf_flow_rule_route_common() [all …]
|
| /Linux-v5.15/net/ipv6/ |
| D | esp6.c | 154 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 94 encap = SKB_GSO_CB(skb)->encap_level > 0; in ipv6_gso_segment() 95 if (encap) in ipv6_gso_segment() 107 udpfrag = proto == IPPROTO_UDP && encap && in ipv6_gso_segment() 149 if (encap) in ipv6_gso_segment()
|
| /Linux-v5.15/net/ipv4/ |
| D | esp4.c | 136 struct xfrm_encap_tmpl *encap = x->encap; in esp_find_tcp_sk() local 147 sport = encap->encap_sport; in esp_find_tcp_sk() 148 dport = encap->encap_dport; in esp_find_tcp_sk() 176 if (encap->encap_sport != sport || in esp_find_tcp_sk() 177 encap->encap_dport != dport) { in esp_find_tcp_sk() 277 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) in esp_output_done() 411 struct xfrm_encap_tmpl *encap = x->encap; in esp_output_encap() local 417 sport = encap->encap_sport; in esp_output_encap() 418 dport = encap->encap_dport; in esp_output_encap() 419 encap_type = encap->encap_type; in esp_output_encap() [all …]
|
| /Linux-v5.15/tools/testing/selftests/net/ |
| D | pmtu.sh | 385 encap="${3}" 414 …cmd ${ns_a} ip link add ${encap}_a type ${type} ${mode} local ${a_addr} remote ${b_addr} encap ${e… 417 …cmd ${ns_b} ip link add ${encap}_b type ${type} ${mode} local ${b_addr} remote ${a_addr} encap ${e… 420 run_cmd ${ns_a} ip addr add ${tunnel4_a_addr}/${tunnel4_mask} dev ${encap}_a 421 run_cmd ${ns_b} ip addr add ${tunnel4_b_addr}/${tunnel4_mask} dev ${encap}_b 423 run_cmd ${ns_a} ip addr add ${tunnel6_a_addr}/${tunnel6_mask} dev ${encap}_a 424 run_cmd ${ns_b} ip addr add ${tunnel6_b_addr}/${tunnel6_mask} dev ${encap}_b 427 run_cmd ${ns_a} ip link set ${encap}_a up 428 run_cmd ${ns_b} ip link set ${encap}_b up 650 encap=${4} [all …]
|
| D | ioam6.sh | 217 ip -netns ioam-tmp-node route add db02::/64 encap ioam6 trace prealloc \ 434 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 449 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 470 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace \ 504 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 529 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 544 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 565 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace \ 588 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ 607 ip -netns ioam-node-alpha route change db01::/64 encap ioam6 trace prealloc \ [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-v5.15/include/net/ |
| D | ip6_tunnel.h | 64 struct ip_tunnel_encap encap; member 114 if (t->encap.type == TUNNEL_ENCAP_NONE) in ip6_tnl_encap() 117 if (t->encap.type >= MAX_IPTUN_ENCAP_OPS) in ip6_tnl_encap() 121 ops = rcu_dereference(ip6tun_encaps[t->encap.type]); in ip6_tnl_encap() 123 ret = ops->build_header(skb, &t->encap, protocol, fl6); in ip6_tnl_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
|
| D | ip_tunnels.h | 132 struct ip_tunnel_encap encap; member 361 if (t->encap.type == TUNNEL_ENCAP_NONE) in ip_tunnel_encap() 364 if (t->encap.type >= MAX_IPTUN_ENCAP_OPS) in ip_tunnel_encap() 368 ops = rcu_dereference(iptun_encaps[t->encap.type]); in ip_tunnel_encap() 370 ret = ops->build_header(skb, &t->encap, protocol, fl4); in ip_tunnel_encap()
|
| /Linux-v5.15/net/l2tp/ |
| D | l2tp_core.c | 373 (session_walk->tunnel->encap == L2TP_ENCAPTYPE_IP || in l2tp_session_register() 374 tunnel->encap == L2TP_ENCAPTYPE_IP)) { in l2tp_session_register() 966 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_build_l2tpv3_header() 1028 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core() 1068 switch (tunnel->encap) { in l2tp_xmit_core() 1141 switch (tunnel->encap) { in l2tp_tunnel_destruct() 1283 switch (cfg->encap) { in l2tp_tunnel_sock_create() 1394 enum l2tp_encap_type encap = L2TP_ENCAPTYPE_UDP; in l2tp_tunnel_create() local 1397 encap = cfg->encap; in l2tp_tunnel_create() 1414 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-v5.15/net/xfrm/ |
| D | xfrm_state.c | 433 .encap = XFRM_MODE_BEET, 438 .encap = XFRM_MODE_TRANSPORT, 442 .encap = XFRM_MODE_TUNNEL, 450 .encap = XFRM_MODE_BEET, 455 .encap = XFRM_MODE_ROUTEOPTIMIZATION, 459 .encap = XFRM_MODE_TRANSPORT, 463 .encap = XFRM_MODE_TUNNEL, 469 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument 473 if (unlikely(encap >= XFRM_MODE_MAX)) in xfrm_get_mode() 478 mode = &xfrm4_mode_map[encap]; in xfrm_get_mode() [all …]
|
| /Linux-v5.15/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-v5.15/net/core/ |
| D | lwtunnel.c | 109 struct nlattr *encap, unsigned int family, in lwtunnel_build_state() argument 119 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state() 132 ret = ops->build_state(net, encap, family, cfg, lws, extack); in lwtunnel_build_state() 139 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state()
|
| /Linux-v5.15/drivers/infiniband/core/ |
| D | uverbs_std_types_flow_action.c | 221 struct ib_flow_spec_list encap; member 296 ret = flow_action_esp_get_encap(&esp_attr->encap, attrs); in parse_flow_action_esp() 300 esp_attr->hdr.encap = &esp_attr->encap; in parse_flow_action_esp()
|
| /Linux-v5.15/tools/testing/selftests/bpf/ |
| D | test_lwt_ip_encap.sh | 367 ip -netns ${NS1} route add ${IPv4_DST} encap bpf xmit obj \ 369 ip -netns ${NS1} -6 route add ${IPv6_DST} encap bpf xmit obj \ 372 ip -netns ${NS1} route add ${IPv4_DST} encap bpf xmit obj \ 374 ip -netns ${NS1} -6 route add ${IPv6_DST} encap bpf xmit obj \ 425 ip -netns ${NS2} route add ${IPv4_DST} encap bpf in obj \ 427 ip -netns ${NS2} -6 route add ${IPv6_DST} encap bpf in obj \ 430 ip -netns ${NS2} route add ${IPv4_DST} encap bpf in obj \ 432 ip -netns ${NS2} -6 route add ${IPv6_DST} encap bpf in obj \
|
| D | test_lwt_seg6local.sh | 114 ip netns exec ns2 ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev v… 118 ip netns exec ns3 ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6… 120 ip netns exec ns4 ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6… 125 ip netns exec ns5 ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6…
|
| /Linux-v5.15/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"
|
| /Linux-v5.15/drivers/net/ethernet/sfc/ |
| D | ef100_tx.c | 196 bool encap = skb->encapsulation; in ef100_make_tso_desc() local 211 if (encap) { in ef100_make_tso_desc() 247 ESF_GZ_TX_TSO_ED_OUTER_IP_LEN, encap && !gso_partial, in ef100_make_tso_desc() 248 ESF_GZ_TX_TSO_ED_OUTER_IP4_ID, encap ? mangleid : in ef100_make_tso_desc()
|