| /linux/drivers/net/ethernet/sfc/ |
| H A D | tc_encap_actions.c | 87 struct efx_tc_encap_action *encap, struct net *net, in efx_bind_neigh() argument 99 switch ((int)encap->type) { in efx_bind_neigh() 103 flow4.fl4_dport = encap->key.tp_dst; in efx_bind_neigh() 104 flow4.flowi4_dscp = inet_dsfield_to_dscp(encap->key.tos); in efx_bind_neigh() 105 flow4.daddr = encap->key.u.ipv4.dst; in efx_bind_neigh() 106 flow4.saddr = encap->key.u.ipv4.src; in efx_bind_neigh() 111 flow6.fl6_dport = encap->key.tp_dst; in efx_bind_neigh() 112 flow6.flowlabel = ip6_make_flowinfo(encap->key.tos, in efx_bind_neigh() 113 encap->key.label); in efx_bind_neigh() 114 flow6.daddr = encap in efx_bind_neigh() 237 efx_release_neigh(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_release_neigh() argument 250 efx_gen_tun_header_eth(struct efx_tc_encap_action * encap,u16 proto) efx_gen_tun_header_eth() argument 266 efx_gen_tun_header_ipv4(struct efx_tc_encap_action * encap,u8 ipproto,u8 len) efx_gen_tun_header_ipv4() argument 286 efx_gen_tun_header_ipv6(struct efx_tc_encap_action * encap,u8 ipproto,u8 len) efx_gen_tun_header_ipv6() argument 305 efx_gen_tun_header_udp(struct efx_tc_encap_action * encap,u8 len) efx_gen_tun_header_udp() argument 317 efx_gen_tun_header_vxlan(struct efx_tc_encap_action * encap) efx_gen_tun_header_vxlan() argument 329 efx_gen_tun_header_geneve(struct efx_tc_encap_action * encap) efx_gen_tun_header_geneve() argument 350 efx_gen_vxlan_header_ipv4(struct efx_tc_encap_action * encap) efx_gen_vxlan_header_ipv4() argument 361 efx_gen_geneve_header_ipv4(struct efx_tc_encap_action * encap) efx_gen_geneve_header_ipv4() argument 372 efx_gen_vxlan_header_ipv6(struct efx_tc_encap_action * encap) efx_gen_vxlan_header_ipv6() argument 382 efx_gen_geneve_header_ipv6(struct efx_tc_encap_action * encap) efx_gen_geneve_header_ipv6() argument 393 efx_gen_encap_header(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_gen_encap_header() argument 430 efx_tc_update_encap(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_tc_update_encap() argument 508 struct efx_tc_encap_action *encap; efx_neigh_update() local 604 struct efx_tc_encap_action *encap, *old; efx_tc_flower_create_encap_md() local 693 efx_tc_flower_release_encap_md(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_tc_flower_release_encap_md() argument 706 struct efx_tc_encap_action *encap, *next; efx_tc_remove_neigh_users() local [all...] |
| H A D | tc.c | 465 struct efx_tc_encap_match *encap) in efx_tc_flower_release_encap_match() argument 469 if (!refcount_dec_and_test(&encap->ref)) in efx_tc_flower_release_encap_match() 472 if (encap->type == EFX_TC_EM_DIRECT) { in efx_tc_flower_release_encap_match() 473 rc = efx_mae_unregister_encap_match(efx, encap); in efx_tc_flower_release_encap_match() 479 "Failed to release encap match %#x, rc %d\n", in efx_tc_flower_release_encap_match() 480 encap->fw_id, rc); in efx_tc_flower_release_encap_match() 482 rhashtable_remove_fast(&efx->tc->encap_match_ht, &encap->linkage, in efx_tc_flower_release_encap_match() 484 if (encap->pseudo) in efx_tc_flower_release_encap_match() 485 efx_tc_flower_release_encap_match(efx, encap->pseudo); in efx_tc_flower_release_encap_match() 486 kfree(encap); in efx_tc_flower_release_encap_match() 497 struct efx_tc_encap_match *encap, *old, *pseudo = NULL; efx_tc_flower_record_encap_match() local 2300 struct efx_tc_encap_action *encap; efx_tc_flower_replace() local 2927 struct efx_tc_encap_match *encap = ptr; efx_tc_encap_match_free() local [all...] |
| H A D | mae.c | 699 * (and thus identified the encap protocol to use to extract it). in efx_mae_match_check_caps() 706 NL_SET_ERR_MSG_MOD(extack, "No support for encap rule ID matches"); in efx_mae_match_check_caps() 712 NL_SET_ERR_MSG_MOD(extack, "Match on enc_keyid requires other encap fields"); in efx_mae_match_check_caps() 788 NL_SET_ERR_MSG_MOD(extack, "Unexpected encap match in LHS rule"); in efx_mae_match_check_caps_lhs() 812 /* Checks that the fields needed for encap-rule matches are supported by the 942 struct efx_tc_encap_action *encap) in efx_mae_allocate_encap_md() argument 949 rc = efx_mae_encap_type_to_mae_type(encap->type); in efx_mae_allocate_encap_md() 953 inlen = MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN_LEN(encap->encap_hdr_len); in efx_mae_allocate_encap_md() 957 encap->encap_hdr, in efx_mae_allocate_encap_md() 958 encap in efx_mae_allocate_encap_md() 970 efx_mae_update_encap_md(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_mae_update_encap_md() argument 995 efx_mae_free_encap_md(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_mae_free_encap_md() argument 1467 efx_mae_register_encap_match(struct efx_nic * efx,struct efx_tc_encap_match * encap) efx_mae_register_encap_match() argument 1538 efx_mae_unregister_encap_match(struct efx_nic * efx,struct efx_tc_encap_match * encap) efx_mae_unregister_encap_match() argument [all...] |
| /linux/net/ipv4/ |
| H A D | fou_bpf.c | 45 struct bpf_fou_encap *encap, int type) in bpf_skb_set_fou_encap() argument 50 if (unlikely(!encap)) in bpf_skb_set_fou_encap() 58 info->encap.type = TUNNEL_ENCAP_FOU; in bpf_skb_set_fou_encap() 61 info->encap.type = TUNNEL_ENCAP_GUE; in bpf_skb_set_fou_encap() 64 info->encap.type = TUNNEL_ENCAP_NONE; in bpf_skb_set_fou_encap() 68 info->encap.flags |= TUNNEL_ENCAP_FLAG_CSUM; in bpf_skb_set_fou_encap() 70 info->encap.sport = encap->sport; in bpf_skb_set_fou_encap() 71 info->encap.dport = encap->dport; in bpf_skb_set_fou_encap() 87 struct bpf_fou_encap *encap) in bpf_skb_get_fou_encap() argument 95 encap->sport = info->encap.sport; in bpf_skb_get_fou_encap() [all …]
|
| H A D | esp4.c | 128 struct xfrm_encap_tmpl *encap = x->encap; in esp_find_tcp_sk() local 134 sport = encap->encap_sport; in esp_find_tcp_sk() 135 dport = encap->encap_dport; in esp_find_tcp_sk() 241 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) { in esp_output_done() 379 struct xfrm_encap_tmpl *encap = x->encap; in esp_output_encap() local 385 sport = encap->encap_sport; in esp_output_encap() 386 dport = encap in esp_output_encap() 742 struct xfrm_encap_tmpl *encap = x->encap; esp_input_done2() local 1147 struct xfrm_encap_tmpl *encap = x->encap; esp_init_state() local [all...] |
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_cls_redirect_dynptr.c | 273 static ret_t accept_locally(struct __sk_buff *skb, encap_headers_t *encap) in accept_locally() argument 276 sizeof(*encap) + in accept_locally() 277 sizeof(struct in_addr) * encap->unigue.hop_count; in accept_locally() 281 if (encap->gue.proto_ctype == IPPROTO_IPV6) in accept_locally() 282 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 294 encap_headers_t *encap, struct in_addr *next_hop, in forward_with_gre() argument 298 sizeof(*encap) + in forward_with_gre() 299 sizeof(struct in_addr) * encap->unigue.hop_count; in forward_with_gre() 316 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in forward_with_gre() 421 encap_headers_t *encap, struc in forward_to_next_hop() argument 477 get_next_hop(struct bpf_dynptr * dynptr,__u64 * offset,encap_headers_t * encap,struct in_addr * next_hop) get_next_hop() argument 860 encap_headers_t *encap; cls_redirect() local [all...] |
| H A D | test_cls_redirect.c | 379 static INLINING ret_t accept_locally(struct __sk_buff *skb, encap_headers_t *encap) in get_global_metrics() 382 sizeof(*encap) + in accept_locally() 383 sizeof(struct in_addr) * encap->unigue.hop_count; in accept_locally() 387 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in accept_locally() 388 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally() 400 static INLINING ret_t forward_with_gre(struct __sk_buff *skb, encap_headers_t *encap, in accept_locally() 406 sizeof(*encap) + in forward_with_gre() 407 sizeof(struct in_addr) * encap->unigue.hop_count; in forward_with_gre() 420 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in forward_with_gre() 527 static INLINING ret_t forward_to_next_hop(struct __sk_buff *skb, encap_headers_t *encap, in forward_with_gre() 381 accept_locally(struct __sk_buff * skb,encap_headers_t * encap) accept_locally() argument 402 forward_with_gre(struct __sk_buff * skb,encap_headers_t * encap,struct in_addr * next_hop,metrics_t * metrics) forward_with_gre() argument 529 forward_to_next_hop(struct __sk_buff * skb,encap_headers_t * encap,struct in_addr * next_hop,metrics_t * metrics) forward_to_next_hop() argument 586 get_next_hop(buf_t * pkt,encap_headers_t * encap,struct in_addr * next_hop) get_next_hop() argument 951 encap_headers_t *encap; cls_redirect() local [all...] |
| H A D | test_tunnel_kern.c | 41 struct bpf_fou_encap___local *encap, int type) __ksym; 43 struct bpf_fou_encap___local *encap) __ksym; 759 struct bpf_fou_encap___local encap = {}; in ipip_gue_set_tunnel() 780 encap.sport = 0; in ipip_gue_set_tunnel() 781 encap.dport = bpf_htons(5555); in ipip_gue_set_tunnel() 783 ret = bpf_skb_set_fou_encap(skb, &encap, in ipip_gue_set_tunnel() 798 struct bpf_fou_encap___local encap = {}; in ipip_fou_set_tunnel() 819 encap.sport = 0; in ipip_fou_set_tunnel() 820 encap.dport = bpf_htons(5555); in ipip_fou_set_tunnel() 822 ret = bpf_skb_set_fou_encap(skb, &encap, in ipip_fou_set_tunnel() 760 struct bpf_fou_encap___local encap = {}; ipip_gue_set_tunnel() local 799 struct bpf_fou_encap___local encap = {}; ipip_fou_set_tunnel() local 838 struct bpf_fou_encap___local encap = {}; ipip_encap_get_tunnel() local [all...] |
| /linux/tools/testing/selftests/net/ |
| H A D | fou_mcast_encap.sh | 63 # Sender: GRETAP with FOU encap (no FOU listener needed on TX side) 66 encap fou encap-sport "$FOU_PORT4" encap-dport "$FOU_PORT4" \ 75 encap fou encap-sport "$FOU_PORT4" encap-dport "$FOU_PORT4" \ 101 # Sender: ip6gretap with FOU encap 104 encap fou encap [all...] |
| H A D | ioam6.sh | 210 encap ioam6 trace prealloc type 0x800000 ns 0 size 4 dev veth0 &>/dev/null 693 encap ioam6 mode $mode trace prealloc type 0x800000 size 4 \ 699 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 size 4 \ 734 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 size 4 \ 740 encap ioam6 mode $mode_tunsrc trace prealloc type 0x800000 ns 0 size 4 \ 774 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 size 4 \ 780 encap ioam6 mode $mode_tundst trace prealloc type 0x800000 ns 0 size 4 \ 811 encap ioam6 mode $mode trace prealloc ns 0 size 4 \ 817 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 size 4 \ 842 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 \ [all …]
|
| H A D | srv6_hencap_red_l3vpn_test.sh | 384 encap seg6local action End dev "${VRF_DEVNAME}" 390 encap seg6local action End.DT46 vrftable "${VRF_TID}" \ 417 # $5 - encap mode (full or red) 435 # If it is not supported, fallback on encap config without tunsrc. 480 encap seg6 mode "${mode}" ${tunsrc} segs "${policy}" \ 491 encap seg6 mode "${mode}" ${tunsrc} segs "${policy}" \ 609 setup_rt_policy_ipv6 2 1 "3 4" 2 encap.red true 610 setup_rt_policy_ipv6 1 2 "" 1 encap.red false 622 setup_rt_policy_ipv4 2 1 "" 2 encap.red true 623 setup_rt_policy_ipv4 1 2 "4 3" 1 encap [all...] |
| H A D | lwt_dst_cache_ref_loop.sh | 54 encap ila 1:2:3:4 csum-mode no-action ident-type luid \ 59 encap ioam6 trace prealloc type 0x800000 ns 0 size 4 \ 63 encap rpl segs 2001:db8:3::1 dev veth0 &>/dev/null 66 encap seg6 mode inline segs 2001:db8:4::1 dev veth0 &>/dev/null 146 encap ila 2001:db8:2:0 csum-mode no-action ident-type luid \ 168 encap ioam6 trace prealloc type 0x800000 ns 1 size 4 \ 186 encap rpl segs 2001:db8:2::2 \ 208 encap seg6 mode inline segs 2001:db8:2::2 \
|
| H A 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 679 encap=${4} [all …]
|
| H A D | srv6_end_dt46_l3vpn_test.sh | 137 # |cafe::2 |apply seg6 encap segs fc00:12:100::6046| 141 # |10.0.0.2 |apply seg6 encap segs fc00:12:100::6046| 150 # |cafe::4 |apply seg6 encap segs fc00:12:200::6046| 154 # |10.0.0.4 |apply seg6 encap segs fc00:12:200::6046| 173 # |cafe::1 |apply seg6 encap segs fc00:21:100::6046| 177 # |10.0.0.1 |apply seg6 encap segs fc00:21:100::6046| 186 # |cafe::3 |apply seg6 encap segs fc00:21:200::6046| 190 # |10.0.0.3 |apply seg6 encap segs fc00:21:200::6046| 313 # set the encap route for encapsulating packets which arrive from the 316 encap seg [all...] |
| H A D | srv6_encap_lookup_l3vpn_test.sh | 6 # This test evaluates the SRv6 encap "lookup" attribute. After encapsulation 9 # used for this post-encap SID route lookup. 18 # table (500) rather than the main table (254). The encap routes use 19 # "lookup 500" to select this table for the post-encap SID route lookup. 38 # underlay = table 500; post-encap SID route lookup (via "lookup 500") 103 # rt-1: underlay table (table 500) - post-encap SID route lookup 113 # | tenant | dst | encap action | 115 # | 100 | cafe::2 | encap segs fc00:1:2:100::0d46 lookup 500 | 119 # | 200 | cafe::4 | encap segs fc00:1:2:200::0d46 lookup 500 | 134 # rt-2: underlay table (table 500) - post-encap SI [all...] |
| /linux/net/bridge/netfilter/ |
| H A 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/net/netfilter/ |
| H A D | nf_flow_table_path.c | 90 } encap[NF_FLOW_TABLE_ENCAP_MAX]; member 147 info->encap[info->num_encaps].id = in nft_dev_path_info() 148 path->encap.id; in nft_dev_path_info() 149 info->encap[info->num_encaps].proto = in nft_dev_path_info() 150 path->encap.proto; in nft_dev_path_info() 154 memcpy(info->h_dest, path->encap.h_dest, ETH_ALEN); in nft_dev_path_info() 174 info->encap[info->num_encaps].id = path->bridge.vlan_id; in nft_dev_path_info() 175 info->encap[info->num_encaps].proto = path->bridge.vlan_proto; in nft_dev_path_info() 245 route->tuple[!dir].in.encap[i].id = info.encap[ in nft_dev_forward_path() [all...] |
| /linux/drivers/crypto/caam/ |
| H A D | blob_gen.c | 73 struct caam_blob_info *info, bool encap) in caam_process_blob() argument 89 if (encap) { in caam_process_blob() 98 if (encap && info->pkey_info.is_pkey) { in caam_process_blob() 117 encap ? DMA_BIDIRECTIONAL : DMA_TO_DEVICE); in caam_process_blob() 146 if (encap && info->pkey_info.is_pkey) { in caam_process_blob() 207 encap ? DMA_BIDIRECTIONAL : DMA_TO_DEVICE); in caam_process_blob()
|
| /linux/net/ipv6/ |
| H A D | esp6.c | 145 struct xfrm_encap_tmpl *encap = x->encap; in esp6_find_tcp_sk() local 151 sport = encap->encap_sport; in esp6_find_tcp_sk() 152 dport = encap->encap_dport; in esp6_find_tcp_sk() 229 /* UDP encap with IPv6 requires a valid checksum */ in esp_output_encap_csum() 278 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) { in esp_output_done() 410 struct xfrm_encap_tmpl *encap = x->encap; in esp6_output_encap() local 416 sport = encap in esp6_output_encap() 773 struct xfrm_encap_tmpl *encap = x->encap; esp6_input_done2() local 1195 struct xfrm_encap_tmpl *encap = x->encap; esp6_init_state() local [all...] |
| /linux/include/net/ |
| H A D | ip6_tunnel.h | 66 struct ip_tunnel_encap encap; 116 if (t->encap.type == TUNNEL_ENCAP_NONE) in ip6_tnl_encap() 119 if (t->encap.type >= MAX_IPTUN_ENCAP_OPS) in ip6_tnl_encap() 123 ops = rcu_dereference(ip6tun_encaps[t->encap.type]); in ip6_tnl_encap() 125 ret = ops->build_header(skb, &t->encap, protocol, fl6); in ip6_tnl_encap() 65 struct ip_tunnel_encap encap; global() member
|
| /linux/net/l2tp/ |
| H A D | l2tp_core.c | 151 switch (tunnel->encap) { in l2tp_tunnel_free() 482 /* If existing session is in IP-encap tunnel, refuse new session */ in l2tp_session_collision_add() 483 if (session2->tunnel->encap == L2TP_ENCAPTYPE_IP) in l2tp_session_collision_add() 574 /* IP encap expects session IDs to be globally unique, while in l2tp_session_register() 575 * UDP encap doesn't. This isn't per the RFC, which says that in l2tp_session_register() 579 if (err == -ENOSPC && tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_session_register() 1175 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_build_l2tpv3_header() 1242 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core() 1282 /* Report transmitted length before we add encap header, which keeps in l2tp_xmit_core() 1283 * statistics consistent for both UDP and IP encap t in l2tp_xmit_core() 1576 enum l2tp_encap_type encap = L2TP_ENCAPTYPE_UDP; l2tp_tunnel_create() local 1614 l2tp_validate_socket(const struct sock * sk,const struct net * net,enum l2tp_encap_type encap) l2tp_validate_socket() argument 1766 l2tp_session_set_header_len(struct l2tp_session * session,int version,enum l2tp_encap_type encap) l2tp_session_set_header_len() argument [all...] |
| H A D | trace.h | 60 __field(enum l2tp_encap_type, encap) 68 __entry->encap = tunnel->encap; 73 show_encap_type_name(__entry->encap),
|
| /linux/net/psp/ |
| H A D | psp_main.c | 304 int l2_hlen = 0, l3_hlen, encap, psp_hlen; in psp_dev_rcv() 377 encap = sizeof(struct udphdr) + psp_hlen; in psp_dev_rcv() 378 encap += strip_icv ? PSP_TRL_SIZE : 0; in psp_dev_rcv() 383 if (unlikely(ntohs(iph->tot_len) < l3_hlen + encap)) in psp_dev_rcv() 387 iph->tot_len = htons(ntohs(iph->tot_len) - encap); in psp_dev_rcv() 393 if (unlikely(ntohs(ipv6h->payload_len) < encap)) in psp_dev_rcv() 397 ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) - encap); in psp_dev_rcv() 301 int l2_hlen = 0, l3_hlen, encap, psp_hlen; psp_dev_rcv() local
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| H A 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/tools/testing/selftests/bpf/prog_tests/ |
| H A D | cls_redirect.c | 175 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in test_str() 179 *encap = (encap_headers_t){ in test_str() 211 encap_headers_t encap; 227 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in encap_init() 228 p = mempcpy(p, &encap, sizeof(encap)); in encap_init() 218 encap_init(encap_headers_t * encap,uint8_t hop_count,uint8_t proto) encap_init() argument 248 encap_headers_t encap; build_input() local
|