/linux-6.6.21/drivers/net/ethernet/sfc/ |
D | tc_encap_actions.c | 85 struct efx_tc_encap_action *encap, struct net *net, in efx_bind_neigh() argument 97 switch ((int)encap->type) { in efx_bind_neigh() 101 flow4.fl4_dport = encap->key.tp_dst; in efx_bind_neigh() 102 flow4.flowi4_tos = encap->key.tos; in efx_bind_neigh() 103 flow4.daddr = encap->key.u.ipv4.dst; in efx_bind_neigh() 104 flow4.saddr = encap->key.u.ipv4.src; in efx_bind_neigh() 109 flow6.fl6_dport = encap->key.tp_dst; in efx_bind_neigh() 110 flow6.flowlabel = ip6_make_flowinfo(encap->key.tos, in efx_bind_neigh() 111 encap->key.label); in efx_bind_neigh() 112 flow6.daddr = encap->key.u.ipv6.dst; in efx_bind_neigh() [all …]
|
D | tc.c | 469 struct efx_tc_encap_match *encap) in efx_tc_flower_release_encap_match() argument 473 if (!refcount_dec_and_test(&encap->ref)) in efx_tc_flower_release_encap_match() 476 if (encap->type == EFX_TC_EM_DIRECT) { in efx_tc_flower_release_encap_match() 477 rc = efx_mae_unregister_encap_match(efx, encap); in efx_tc_flower_release_encap_match() 484 encap->fw_id, rc); in efx_tc_flower_release_encap_match() 486 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage, in efx_tc_flower_release_encap_match() 488 if (encap->pseudo) in efx_tc_flower_release_encap_match() 489 efx_tc_flower_release_encap_match(efx, encap->pseudo); in efx_tc_flower_release_encap_match() 490 kfree(encap); in efx_tc_flower_release_encap_match() 501 struct efx_tc_encap_match *encap, *old, *pseudo = NULL; in efx_tc_flower_record_encap_match() local [all …]
|
D | tc_counters.c | 90 struct efx_tc_encap_action *encap; in efx_tc_counter_work() local 99 encap = act->encap_md; in efx_tc_counter_work() 100 if (!encap) in efx_tc_counter_work() 102 if (!encap->neigh) /* can't happen */ in efx_tc_counter_work() 104 if (time_after_eq(encap->neigh->used, touched)) in efx_tc_counter_work() 106 encap->neigh->used = touched; in efx_tc_counter_work() 110 if (encap->neigh->dst_ip) in efx_tc_counter_work() 111 n = neigh_lookup(&arp_tbl, &encap->neigh->dst_ip, in efx_tc_counter_work() 112 encap->neigh->egdev); in efx_tc_counter_work() 116 &encap->neigh->dst_ip6, in efx_tc_counter_work() [all …]
|
D | mae.h | 100 struct efx_tc_encap_action *encap); 102 struct efx_tc_encap_action *encap); 104 struct efx_tc_encap_action *encap); 119 struct efx_tc_encap_match *encap); 121 struct efx_tc_encap_match *encap);
|
D | mae.c | 955 struct efx_tc_encap_action *encap) in efx_mae_allocate_encap_md() argument 962 rc = efx_mae_encap_type_to_mae_type(encap->type); in efx_mae_allocate_encap_md() 966 inlen = MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN_LEN(encap->encap_hdr_len); in efx_mae_allocate_encap_md() 970 encap->encap_hdr, in efx_mae_allocate_encap_md() 971 encap->encap_hdr_len); in efx_mae_allocate_encap_md() 978 encap->fw_id = MCDI_DWORD(outbuf, MAE_ENCAP_HEADER_ALLOC_OUT_ENCAP_HEADER_ID); in efx_mae_allocate_encap_md() 983 struct efx_tc_encap_action *encap) in efx_mae_update_encap_md() argument 989 rc = efx_mae_encap_type_to_mae_type(encap->type); in efx_mae_update_encap_md() 994 encap->fw_id); in efx_mae_update_encap_md() 995 inlen = MC_CMD_MAE_ENCAP_HEADER_UPDATE_IN_LEN(encap->encap_hdr_len); in efx_mae_update_encap_md() [all …]
|
/linux-6.6.21/net/ipv4/ |
D | fou_bpf.c | 47 struct bpf_fou_encap *encap, int type) in bpf_skb_set_fou_encap() argument 52 if (unlikely(!encap)) in bpf_skb_set_fou_encap() 60 info->encap.type = TUNNEL_ENCAP_FOU; in bpf_skb_set_fou_encap() 63 info->encap.type = TUNNEL_ENCAP_GUE; in bpf_skb_set_fou_encap() 66 info->encap.type = TUNNEL_ENCAP_NONE; in bpf_skb_set_fou_encap() 70 info->encap.flags |= TUNNEL_ENCAP_FLAG_CSUM; in bpf_skb_set_fou_encap() 72 info->encap.sport = encap->sport; in bpf_skb_set_fou_encap() 73 info->encap.dport = encap->dport; in bpf_skb_set_fou_encap() 89 struct bpf_fou_encap *encap) in bpf_skb_get_fou_encap() argument 97 encap->sport = info->encap.sport; in bpf_skb_get_fou_encap() [all …]
|
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.6.21/tools/testing/selftests/bpf/progs/ |
D | test_cls_redirect_dynptr.c | 271 static ret_t accept_locally(struct __sk_buff *skb, encap_headers_t *encap) in accept_locally() argument 274 sizeof(*encap) + in accept_locally() 275 sizeof(struct in_addr) * encap->unigue.hop_count; in accept_locally() 279 if (encap->gue.proto_ctype == IPPROTO_IPV6) in accept_locally() 280 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 292 encap_headers_t *encap, struct in_addr *next_hop, in forward_with_gre() argument 296 sizeof(*encap) + in forward_with_gre() 297 sizeof(struct in_addr) * encap->unigue.hop_count; in forward_with_gre() 314 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in forward_with_gre() 419 encap_headers_t *encap, struct in_addr *next_hop, in forward_to_next_hop() argument [all …]
|
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 …]
|
D | test_tunnel_kern.c | 66 struct bpf_fou_encap *encap, int type) __ksym; 68 struct bpf_fou_encap *encap) __ksym; 771 struct bpf_fou_encap encap = {}; in ipip_gue_set_tunnel() local 792 encap.sport = 0; in ipip_gue_set_tunnel() 793 encap.dport = bpf_htons(5555); in ipip_gue_set_tunnel() 795 ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_GUE); in ipip_gue_set_tunnel() 808 struct bpf_fou_encap encap = {}; in ipip_fou_set_tunnel() local 829 encap.sport = 0; in ipip_fou_set_tunnel() 830 encap.dport = bpf_htons(5555); in ipip_fou_set_tunnel() 832 ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_FOU); in ipip_fou_set_tunnel() [all …]
|
/linux-6.6.21/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.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | tc_tun_encap.c | 792 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_tbl_get_last_update() local 797 encap = uplink_priv->encap; in mlx5e_route_tbl_get_last_update() 799 spin_lock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 800 ret = encap->route_tbl_last_update; in mlx5e_route_tbl_get_last_update() 801 spin_unlock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update() 1158 mlx5e_route_get(struct mlx5e_tc_tun_encap *encap, struct mlx5e_route_key *key, in mlx5e_route_get() argument 1164 hash_for_each_possible(encap->route_tbl, r, hlist, hash_key) { in mlx5e_route_get() 1182 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_get_create() local 1188 encap = uplink_priv->encap; in mlx5e_route_get_create() 1191 spin_lock_bh(&encap->route_lock); in mlx5e_route_get_create() [all …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/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()
|
/linux-6.6.21/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()
|
/linux-6.6.21/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 | 401 encap="${3}" 430 …cmd ${ns_a} ip link add ${encap}_a type ${type} ${mode} local ${a_addr} remote ${b_addr} encap ${e… 433 …cmd ${ns_b} ip link add ${encap}_b type ${type} ${mode} local ${b_addr} remote ${a_addr} encap ${e… 436 run_cmd ${ns_a} ip addr add ${tunnel4_a_addr}/${tunnel4_mask} dev ${encap}_a 437 run_cmd ${ns_b} ip addr add ${tunnel4_b_addr}/${tunnel4_mask} dev ${encap}_b 439 run_cmd ${ns_a} ip addr add ${tunnel6_a_addr}/${tunnel6_mask} dev ${encap}_a 440 run_cmd ${ns_b} ip addr add ${tunnel6_b_addr}/${tunnel6_mask} dev ${encap}_b 443 run_cmd ${ns_a} ip link set ${encap}_a up 444 run_cmd ${ns_b} ip link set ${encap}_b up 670 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.6.21/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),
|
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ipsec_rxtx.c | 223 struct xfrm_encap_tmpl *encap; in mlx5e_ipsec_tx_build_eseg() local 249 encap = x->encap; in mlx5e_ipsec_tx_build_eseg() 250 if (!encap) { in mlx5e_ipsec_tx_build_eseg() 254 } else if (encap->encap_type == UDP_ENCAP_ESPINUDP) { in mlx5e_ipsec_tx_build_eseg()
|
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
D | cls_redirect.c | 250 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in encap_init() argument 254 *encap = (encap_headers_t){ in encap_init() 280 encap_headers_t encap; in build_input() local 293 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in build_input() 294 p = mempcpy(p, &encap, sizeof(encap)); in build_input()
|
D | test_tunnel.c | 213 static int add_ipip_tunnel(enum ipip_encap encap) in add_ipip_tunnel() argument 218 switch (encap) { in add_ipip_tunnel() 465 static void test_ipip_tunnel(enum ipip_encap encap) in test_ipip_tunnel() argument 476 err = add_ipip_tunnel(encap); in test_ipip_tunnel() 489 switch (encap) { in test_ipip_tunnel()
|
/linux-6.6.21/net/xfrm/ |
D | xfrm_state.c | 455 .encap = XFRM_MODE_BEET, 460 .encap = XFRM_MODE_TRANSPORT, 464 .encap = XFRM_MODE_TUNNEL, 472 .encap = XFRM_MODE_BEET, 477 .encap = XFRM_MODE_ROUTEOPTIMIZATION, 481 .encap = XFRM_MODE_TRANSPORT, 485 .encap = XFRM_MODE_TUNNEL, 491 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument 495 if (unlikely(encap >= XFRM_MODE_MAX)) in xfrm_get_mode() 500 mode = &xfrm4_mode_map[encap]; in xfrm_get_mode() [all …]
|