Home
last modified time | relevance | path

Searched refs:encap (Results 1 – 25 of 119) sorted by relevance

12345

/linux/drivers/net/ethernet/sfc/
H A Dtc_encap_actions.c85 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 …]
H A Dtc.c465 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()
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; in efx_tc_flower_record_encap_match() local
[all …]
H A Dtc_counters.c90 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 …]
/linux/net/ipv4/
H A Dfou_bpf.c45 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 Desp4.c138 struct xfrm_encap_tmpl *encap = x->encap; in esp_find_tcp_sk() local
150 sport = encap->encap_sport; in esp_find_tcp_sk()
151 dport = encap->encap_dport; in esp_find_tcp_sk()
179 if (encap->encap_sport != sport || in esp_find_tcp_sk()
180 encap->encap_dport != dport) { in esp_find_tcp_sk()
279 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/tools/testing/selftests/bpf/progs/
H A Dtest_cls_redirect_dynptr.c273 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, struct in_addr *next_hop, in forward_to_next_hop() argument
[all …]
H A Dtest_cls_redirect.c381 static INLINING ret_t accept_locally(struct __sk_buff *skb, encap_headers_t *encap) in accept_locally() argument
384 sizeof(*encap) + in accept_locally()
385 sizeof(struct in_addr) * encap->unigue.hop_count; in accept_locally()
389 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in accept_locally()
390 encap->eth.h_proto = bpf_htons(ETH_P_IPV6); in accept_locally()
402 static INLINING ret_t forward_with_gre(struct __sk_buff *skb, encap_headers_t *encap, in forward_with_gre() argument
408 sizeof(*encap) + in forward_with_gre()
409 sizeof(struct in_addr) * encap->unigue.hop_count; in forward_with_gre()
422 if (encap->gue.proto_ctype == IPPROTO_IPV6) { in forward_with_gre()
529 static INLINING ret_t forward_to_next_hop(struct __sk_buff *skb, encap_headers_t *encap, in forward_to_next_hop() argument
[all …]
H A Dtest_tunnel_kern.c42 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/net/bridge/netfilter/
H A Debt_vlan.c34 __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/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dtc_tun_encap.c801 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_tbl_get_last_update() local
806 encap = uplink_priv->encap; in mlx5e_route_tbl_get_last_update()
808 spin_lock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update()
809 ret = encap->route_tbl_last_update; in mlx5e_route_tbl_get_last_update()
810 spin_unlock_bh(&encap->route_lock); in mlx5e_route_tbl_get_last_update()
1167 mlx5e_route_get(struct mlx5e_tc_tun_encap *encap, struct mlx5e_route_key *key, in mlx5e_route_get() argument
1173 hash_for_each_possible(encap->route_tbl, r, hlist, hash_key) { in mlx5e_route_get()
1191 struct mlx5e_tc_tun_encap *encap; in mlx5e_route_get_create() local
1197 encap = uplink_priv->encap; in mlx5e_route_get_create()
1200 spin_lock_bh(&encap->route_lock); in mlx5e_route_get_create()
[all …]
/linux/net/ipv6/
H A Desp6.c155 struct xfrm_encap_tmpl *encap = x->encap; in esp6_find_tcp_sk() local
167 sport = encap->encap_sport; in esp6_find_tcp_sk()
168 dport = encap->encap_dport; in esp6_find_tcp_sk()
196 if (encap->encap_sport != sport || in esp6_find_tcp_sk()
197 encap->encap_dport != dport) { in esp6_find_tcp_sk()
315 x->encap && x->encap->encap_type == TCP_ENCAP_ESPINTCP) in esp_output_done()
442 struct xfrm_encap_tmpl *encap = x->encap; in esp6_output_encap() local
448 sport = encap->encap_sport; in esp6_output_encap()
449 dport = encap->encap_dport; in esp6_output_encap()
450 encap_type = encap->encap_type; in esp6_output_encap()
[all …]
/linux/Documentation/networking/devlink/
H A Ddevlink-eswitch-attr.rst52 * - ``encap-mode``
68 # set inline-mode and encap-mode
69 $ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic
73 pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic
75 # enable encap-mode with legacy mode
76 $ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basic
/linux/net/netfilter/
H A Dnft_flow_offload.c87 } encap[NF_FLOW_TABLE_ENCAP_MAX]; member
129 info->encap[info->num_encaps].id = path->encap.id; in nft_dev_path_info()
130 info->encap[info->num_encaps].proto = path->encap.proto; in nft_dev_path_info()
133 memcpy(info->h_dest, path->encap.h_dest, ETH_ALEN); in nft_dev_path_info()
144 info->encap[info->num_encaps].id = path->bridge.vlan_id; in nft_dev_path_info()
145 info->encap[info->num_encaps].proto = path->bridge.vlan_proto; in nft_dev_path_info()
207 route->tuple[!dir].in.encap[i].id = info.encap[i].id; in nft_dev_forward_path()
208 route->tuple[!dir].in.encap[i].proto = info.encap[i].proto; in nft_dev_forward_path()
H A Dnf_flow_table_offload.c120 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/tools/testing/selftests/net/
H A Dsrv6_hencap_red_l3vpn_test.sh425 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
H A Dioam6.sh210 encap ioam6 trace prealloc type 0x800000 ns 0 size 4 dev veth0 &>/dev/null
213 ip -netns $ioam_tmp_node -6 route 2>/dev/null | grep -q "encap ioam6"
420 $test "encap"
450 $test "encap"
457 $test "encap" "tunsrc"
490 $test "encap"
689 [ "$1" == "encap" ] && mode="$1 tundst 2001:db8:2::2" || mode="$1"
693 encap ioam6 mode $mode trace prealloc type 0x800000 size 4 \
699 encap ioam6 mode $mode trace prealloc type 0x800000 ns 0 size 4 \
713 # Make sure the Tunnel Source is only (and possibly) used with encap mod
[all...]
H A Dpmtu.sh411 encap="${3}"
440 …cmd ${ns_a} ip link add ${encap}_a type ${type} ${mode} local ${a_addr} remote ${b_addr} encap ${e…
443 …cmd ${ns_b} ip link add ${encap}_b type ${type} ${mode} local ${b_addr} remote ${a_addr} encap ${e…
446 run_cmd ${ns_a} ip addr add ${tunnel4_a_addr}/${tunnel4_mask} dev ${encap}_a
447 run_cmd ${ns_b} ip addr add ${tunnel4_b_addr}/${tunnel4_mask} dev ${encap}_b
449 run_cmd ${ns_a} ip addr add ${tunnel6_a_addr}/${tunnel6_mask} dev ${encap}_a
450 run_cmd ${ns_b} ip addr add ${tunnel6_b_addr}/${tunnel6_mask} dev ${encap}_b
453 run_cmd ${ns_a} ip link set ${encap}_a up
454 run_cmd ${ns_b} ip link set ${encap}_b up
680 encap=${4}
[all …]
H A Dsrv6_end_dt46_l3vpn_test.sh338 encap seg6 mode encap segs ${vpn_sid} dev veth0
340 encap seg6 mode encap segs ${vpn_sid} dev veth0
347 encap seg6local action End.DT46 vrftable ${tid} dev vrf-${tid}
/linux/include/net/
H A Dip6_tunnel.h65 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()
H A Dlwtunnel.h40 int (*build_state)(struct net *net, struct nlattr *encap,
123 struct nlattr *encap,
219 struct nlattr *encap, in lwtunnel_build_state() argument
/linux/net/l2tp/
H A Dl2tp_core.c151 switch (tunnel->encap) { in l2tp_tunnel_free()
482 if (session2->tunnel->encap == L2TP_ENCAPTYPE_IP) in l2tp_session_collision_add()
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()
1174 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_build_l2tpv3_header()
1236 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core()
1282 switch (tunnel->encap) { in l2tp_xmit_core()
1459 switch (cfg->encap) { in l2tp_tunnel_sock_create()
1568 enum l2tp_encap_type encap = L2TP_ENCAPTYPE_UDP; in l2tp_tunnel_create() local
[all …]
H A Dtrace.h60 __field(enum l2tp_encap_type, encap)
68 __entry->encap = tunnel->encap;
73 show_encap_type_name(__entry->encap),
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec_rxtx.c223 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 Dcls_redirect.c218 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in encap_init() argument
222 *encap = (encap_headers_t){ in encap_init()
248 encap_headers_t encap; in build_input() local
261 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in build_input()
262 p = mempcpy(p, &encap, sizeof(encap)); in build_input()
/linux/tools/testing/selftests/bpf/
H A Dtest_lwt_ip_encap.sh376 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 \

12345