| /linux/net/ipv4/ |
| H A D | fou_bpf.c | 27 /* bpf_skb_set_fou_encap - Set FOU encap parameters 37 * @encap Pointer to a `struct bpf_fou_encap` storing UDP src and 39 * port. This is similar to using `encap-sport auto`. 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() [all …]
|
| H A D | esp4.c | 125 struct xfrm_encap_tmpl *encap = x->encap; in esp_find_tcp_sk() local 131 sport = encap->encap_sport; in esp_find_tcp_sk() 132 dport = encap->encap_dport; in esp_find_tcp_sk() 238 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) { in esp_output_done() 376 struct xfrm_encap_tmpl *encap = x->encap; in esp_output_encap() local 382 sport = encap->encap_sport; in esp_output_encap() 383 dport = encap->encap_dport; in esp_output_encap() 384 encap_type = encap->encap_type; in esp_output_encap() 415 if (x->encap) { in esp_output_head() 607 if (!err && x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) in esp_output_tail() [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 | 42 struct bpf_fou_encap *encap, int type) __ksym; 44 struct bpf_fou_encap *encap) __ksym; 760 struct bpf_fou_encap___local encap = {}; in ipip_gue_set_tunnel() local 781 encap.sport = 0; in ipip_gue_set_tunnel() 782 encap.dport = bpf_htons(5555); in ipip_gue_set_tunnel() 784 ret = bpf_skb_set_fou_encap(skb, (struct bpf_fou_encap *)&encap, in ipip_gue_set_tunnel() 799 struct bpf_fou_encap___local encap = {}; in ipip_fou_set_tunnel() local 820 encap.sport = 0; in ipip_fou_set_tunnel() 821 encap.dport = bpf_htons(5555); in ipip_fou_set_tunnel() 823 ret = bpf_skb_set_fou_encap(skb, (struct bpf_fou_encap *)&encap, in ipip_fou_set_tunnel() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | lwt_dst_cache_ref_loop.sh | 8 # This is just a dummy script that triggers encap cases with possible dst cache 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 68 ip -netns $tmp_node -6 route 2>/dev/null | grep -q "encap ila" 71 ip -netns $tmp_node -6 route 2>/dev/null | grep -q "encap ioam6" 74 ip -netns $tmp_node -6 route 2>/dev/null | grep -q "encap rpl" 77 ip -netns $tmp_node -6 route 2>/dev/null | grep -q "encap seg6" 146 encap ila 2001:db8:2:0 csum-mode no-action ident-type luid \ [all …]
|
| H A D | srv6_iptunnel_cache.sh | 36 # ns_router: encap (main table) 40 # | cafe::1 | encap seg6 mode encap segs fc00::100 | 43 # ns_router: post-encap SID resolution 131 encap seg6 mode encap segs "${SID}" dev veth-r0 142 encap seg6local action End.DT6 table 255 dev veth-d0
|
| H A D | srv6_hencap_red_l3vpn_test.sh | 19 # optimization of the SRv6 H.Encap aiming to reduce the length of the SID 401 encap seg6local action End dev "${VRF_DEVNAME}" 407 encap seg6local action End.DT46 vrftable "${VRF_TID}" \ 434 # $5 - encap mode (full or red) 452 # If it is not supported, fallback on encap config without tunsrc. 497 encap seg6 mode "${mode}" ${tunsrc} segs "${policy}" \ 508 encap seg6 mode "${mode}" ${tunsrc} segs "${policy}" \ 626 setup_rt_policy_ipv6 2 1 "3 4" 2 encap.red true 627 setup_rt_policy_ipv6 1 2 "" 1 encap.red false 639 setup_rt_policy_ipv4 2 1 "" 2 encap [all...] |
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_lwt_ip_encap.sh | |
| H A D | test_tc_tunnel.sh | |
| /linux/include/uapi/linux/ |
| H A D | ioam6_iptunnel.h | 12 /* Encap modes: 14 * - encap: ip6ip6 encapsulation 15 * - auto: inline for local packets, encap for in-transit packets 33 /* Encap mode */ 37 * For encap,auto modes. 54 * For encap,auto modes.
|
| H A D | nexthop.h | 53 /* if NHA_BLACKHOLE is added, OIF, GATEWAY, ENCAP can not be set */ 57 NHA_ENCAP_TYPE, /* u16; lwt encap type */ 58 NHA_ENCAP, /* lwt encap data */ 67 /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
|
| /linux/drivers/net/ethernet/sfc/ |
| 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() [all …]
|
| H A D | tc.h | 57 * @encap_md: encap entry in tc_encap_ht table 58 * @encap_user: linked list of encap users (encap_md->users) 93 /* L2 (inner when encap) */ 108 /* Encap. The following are *outer* fields. Note that there are no 133 * These are used to classify "pseudo" encap matches, which don't refer 139 * @EFX_TC_EM_PSEUDO_MASK: registered by an encap match which includes a 141 * to prevent an overlapping encap match _without_ optional fields. 142 * The pseudo encap match may be referenced again by an encap match 147 * Only one reference to this encap match may exist. 167 u32 fw_id; /* index of this entry in firmware encap match table */ [all …]
|
| H A D | tc_encap_actions.h | 32 * @ref: counts encap actions referencing this entry 33 * @used: jiffies of last time traffic hit any encap action using this. 38 * @work: processes neighbour state changes, updates the encap actions 41 * Associates a neighbour entry with the encap actions that are 67 /* This limit is arbitrary; current hardware (SN1022) handles encap headers 83 u32 fw_id; /* index of this entry in firmware encap table */ 98 struct efx_tc_encap_action *encap);
|
| 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->encap_hdr_len); in efx_mae_allocate_encap_md() [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_flow_table_path.c | 82 } encap[NF_FLOW_TABLE_ENCAP_MAX]; member 136 info->encap[info->num_encaps].id = in nft_dev_path_info() 137 path->encap.id; in nft_dev_path_info() 138 info->encap[info->num_encaps].proto = in nft_dev_path_info() 139 path->encap.proto; in nft_dev_path_info() 143 memcpy(info->h_dest, path->encap.h_dest, ETH_ALEN); in nft_dev_path_info() 161 info->encap[info->num_encaps].id = path->bridge.vlan_id; in nft_dev_path_info() 162 info->encap[info->num_encaps].proto = path->bridge.vlan_proto; in nft_dev_path_info() 266 route->tuple[!dir].in.encap[i].id = info.encap[i].id; in nft_dev_forward_path() 267 route->tuple[!dir].in.encap[i].proto = info.encap[i].proto; in nft_dev_forward_path()
|
| /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() 142 pr_debug("encap frame length %d is less than " in ebt_vlan_mt_check() 143 "minimal\n", ntohs(info->encap)); in ebt_vlan_mt_check()
|
| /linux/net/ipv6/ |
| H A D | esp6.c | 142 struct xfrm_encap_tmpl *encap = x->encap; in esp6_find_tcp_sk() local 148 sport = encap->encap_sport; in esp6_find_tcp_sk() 149 dport = encap->encap_dport; in esp6_find_tcp_sk() 226 /* UDP encap with IPv6 requires a valid checksum */ in esp_output_encap_csum() 274 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) { in esp_output_done() 406 struct xfrm_encap_tmpl *encap = x->encap; in esp6_output_encap() local 412 sport = encap->encap_sport; in esp6_output_encap() 413 dport = encap->encap_dport; in esp6_output_encap() 414 encap_type = encap->encap_type; in esp6_output_encap() 444 if (x->encap) { in esp6_output_head() [all …]
|
| /linux/include/net/ |
| H A D | ip6_tunnel.h | 64 int encap_hlen; /* Encap header length (FOU,GUE) */ 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/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | en_rep.h | 97 struct mlx5e_tc_tun_encap *encap; member 150 /* protects encap list */ 152 /* encap list sharing the same neigh */ 171 /* set when the encap entry is successfully offloaded into HW */ 204 /* a node of the eswitch encap hash table which keeping all the encap
|
| /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/drivers/net/ethernet/broadcom/bnxt/ |
| H A D | bnxt_tc.h | 88 /* tunnel encap */ 146 /* Tunnel encap/decap hash table 148 * the same tunnel encap/decap params (ip_daddrs, vni, udp_dport) 150 * A separate table is maintained for encap and decap 205 /* tunnel encap related */
|
| /linux/net/l2tp/ |
| H A D | trace.h | 60 __field(enum l2tp_encap_type, encap) 68 __entry->encap = tunnel->encap; 70 TP_printk("%s: type=%s encap=%s version=L2TPv%d tid=%u ptid=%u fd=%d", 73 show_encap_type_name(__entry->encap),
|
| H A D | l2tp_core.c | 151 switch (tunnel->encap) { in l2tp_tunnel_free() 481 /* If existing session is in IP-encap tunnel, refuse new session */ in l2tp_session_collision_add() 482 if (session2->tunnel->encap == L2TP_ENCAPTYPE_IP) in l2tp_session_collision_add() 573 /* IP encap expects session IDs to be globally unique, while in l2tp_session_register() 574 * UDP encap doesn't. This isn't per the RFC, which says that in l2tp_session_register() 578 if (err == -ENOSPC && tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_session_register() 921 tunnel->encap); in l2tp_recv_common() 943 tunnel->encap); in l2tp_recv_common() 1176 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_build_l2tpv3_header() 1238 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core() [all …]
|