/linux/drivers/net/ethernet/sfc/ |
H A 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 in efx_bind_neigh() 236 efx_release_neigh(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_release_neigh() argument 249 efx_gen_tun_header_eth(struct efx_tc_encap_action * encap,u16 proto) efx_gen_tun_header_eth() argument 265 efx_gen_tun_header_ipv4(struct efx_tc_encap_action * encap,u8 ipproto,u8 len) efx_gen_tun_header_ipv4() argument 285 efx_gen_tun_header_ipv6(struct efx_tc_encap_action * encap,u8 ipproto,u8 len) efx_gen_tun_header_ipv6() argument 304 efx_gen_tun_header_udp(struct efx_tc_encap_action * encap,u8 len) efx_gen_tun_header_udp() argument 316 efx_gen_tun_header_vxlan(struct efx_tc_encap_action * encap) efx_gen_tun_header_vxlan() argument 328 efx_gen_tun_header_geneve(struct efx_tc_encap_action * encap) efx_gen_tun_header_geneve() argument 349 efx_gen_vxlan_header_ipv4(struct efx_tc_encap_action * encap) efx_gen_vxlan_header_ipv4() argument 360 efx_gen_geneve_header_ipv4(struct efx_tc_encap_action * encap) efx_gen_geneve_header_ipv4() argument 371 efx_gen_vxlan_header_ipv6(struct efx_tc_encap_action * encap) efx_gen_vxlan_header_ipv6() argument 381 efx_gen_geneve_header_ipv6(struct efx_tc_encap_action * encap) efx_gen_geneve_header_ipv6() argument 392 efx_gen_encap_header(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_gen_encap_header() argument 429 efx_tc_update_encap(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_tc_update_encap() argument 507 struct efx_tc_encap_action *encap; efx_neigh_update() local 603 struct efx_tc_encap_action *encap, *old; efx_tc_flower_create_encap_md() local 692 efx_tc_flower_release_encap_md(struct efx_nic * efx,struct efx_tc_encap_action * encap) efx_tc_flower_release_encap_md() argument 705 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 | 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 in efx_tc_counter_work() [all...] |
/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 in bpf_skb_set_fou_encap() 87 bpf_skb_get_fou_encap(struct __sk_buff * skb_ctx,struct bpf_fou_encap * encap) bpf_skb_get_fou_encap() argument [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() 373 struct xfrm_encap_tmpl *encap = x->encap; in esp_output_encap() local 379 sport = encap->encap_sport; in esp_output_encap() 380 dport = encap in esp_output_encap() 728 struct xfrm_encap_tmpl *encap = x->encap; esp_input_done2() local 1132 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...] |
/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/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | tc_tun_encap.c | 35 "Matching on external port with encap + fwd to table actions is not allowed for firmware steering\n"); in mlx5e_set_int_port_tunnel() 135 /* Flow can be associated with multiple encap entries. in mlx5e_tc_flow_all_encaps_valid() 204 /* update from slow path rule to encap rule */ in mlx5e_tc_encap_flows_add() 239 /* mark the flow's encap dest as non-valid */ in mlx5e_tc_encap_flows_del() 250 /* update from encap rule to slow path rule */ in mlx5e_tc_encap_flows_del() 256 mlx5_core_warn(priv->mdev, "Failed to update slow path (encap) flow, %d\n", in mlx5e_tc_encap_flows_del() 268 /* we know that the encap is valid */ in mlx5e_tc_encap_flows_del() 280 * unoffloaded from hardware, otherwise deleting encap will in mlx5e_take_tmp_flow() 292 /* Takes reference to all flows attached to encap and adds the flows to 330 /* find encap wit in mlx5e_get_next_matching_encap() 798 struct mlx5e_tc_tun_encap *encap; mlx5e_route_tbl_get_last_update() local 1164 mlx5e_route_get(struct mlx5e_tc_tun_encap * encap,struct mlx5e_route_key * key,u32 hash_key) mlx5e_route_get() argument 1188 struct mlx5e_tc_tun_encap *encap; mlx5e_route_get_create() local 1228 mlx5e_route_lookup_for_update(struct mlx5e_tc_tun_encap * encap,struct mlx5e_route_key * key) mlx5e_route_lookup_for_update() argument 1735 mlx5e_init_fib_work_ipv4(struct mlx5e_priv * priv,struct net_device * ul_dev,struct mlx5e_tc_tun_encap * encap,unsigned long event,struct fib_notifier_info * info) mlx5e_init_fib_work_ipv4() argument 1780 mlx5e_init_fib_work_ipv6(struct mlx5e_priv * priv,struct net_device * ul_dev,struct mlx5e_tc_tun_encap * encap,unsigned long event,struct fib_notifier_info * info) mlx5e_init_fib_work_ipv6() argument 1825 struct mlx5e_tc_tun_encap *encap; mlx5e_tc_tun_fib_event() local 1862 struct mlx5e_tc_tun_encap *encap; mlx5e_tc_tun_init() local 1883 mlx5e_tc_tun_cleanup(struct mlx5e_tc_tun_encap * encap) mlx5e_tc_tun_cleanup() argument [all...] |
/linux/tools/testing/selftests/net/ |
H A D | ioam6.sh | 210 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 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 il [all...] |
H A D | srv6_hencap_red_l3vpn_test.sh | 388 encap seg6local action End dev "${VRF_DEVNAME}" 394 encap seg6local action End.DT46 vrftable "${VRF_TID}" \ 421 # $5 - encap mode (full or red) 447 encap seg6 mode "${mode}" segs "${policy}" \ 458 encap seg6 mode "${mode}" segs "${policy}" \ 576 setup_rt_policy_ipv6 2 1 "3 4" 2 encap.red 577 setup_rt_policy_ipv6 1 2 "" 1 encap.red 589 setup_rt_policy_ipv4 2 1 "" 2 encap.red 590 setup_rt_policy_ipv4 1 2 "4 3" 1 encap.red 603 setup_rt_policy_ipv6 4 3 "2" 4 encap [all...] |
H A D | pmtu.sh | 410 encap="${3}" 439 run_cmd ${ns_a} ip link add ${encap}_a type ${type} ${mode} local ${a_addr} remote ${b_addr} encap ${encap} encap-sport auto encap-dport 5556 || return $ksft_skip 442 run_cmd ${ns_b} ip link add ${encap}_b type ${type} ${mode} local ${b_addr} remote ${a_addr} encap ${encap} encap [all...] |
H A D | srv6_end_dx4_netfilter_test.sh | 91 # |10.0.0.2 |apply seg6 encap segs fc00:12:100::6004| 108 # |10.0.0.1 |apply seg6 encap segs fc00:21:100::6004| 245 # set the encap route for encapsulating packets which arrive from the 248 encap seg6 mode encap segs ${vpn_sid} dev veth0 255 encap seg6local action End.DX4 nh4 ${IPv4_HS_NETWORK}.${hsdst} dev veth-t${tid}
|
H A D | srv6_end_dx6_netfilter_test.sh | 91 # |cafe::2 |apply seg6 encap segs fc00:12:100::6004| 108 # |cafe::1 |apply seg6 encap segs fc00:21:100::6004| 250 # set the encap route for encapsulating packets which arrive from the 253 encap seg6 mode encap segs ${vpn_sid} dev veth0 260 encap seg6local action End.DX6 nh6 ${IPv6_HS_NETWORK}::${hsdst} dev veth-t${tid}
|
/linux/Documentation/networking/devlink/ |
H A D | devlink-eswitch-attr.rst | 52 * - ``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/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() 403 struct xfrm_encap_tmpl *encap = x->encap; in esp6_output_encap() local 409 sport = encap in esp6_output_encap() 758 struct xfrm_encap_tmpl *encap = x->encap; esp6_input_done2() local 1179 struct xfrm_encap_tmpl *encap = x->encap; esp6_init_state() local [all...] |
H A D | ip6_offload.c | 118 bool encap, udpfrag; in ipv6_gso_segment() local 130 encap = SKB_GSO_CB(skb)->encap_level > 0; in ipv6_gso_segment() 131 if (encap) in ipv6_gso_segment() 143 udpfrag = proto == IPPROTO_UDP && encap && in ipv6_gso_segment() 189 if (encap) in ipv6_gso_segment()
|
/linux/include/net/ |
H A 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()
|
H A D | lwtunnel.h | 40 int (*build_state)(struct net *net, struct nlattr *encap, 123 struct nlattr *encap, 220 struct nlattr *encap, in lwtunnel_build_state() argument
|
/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/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),
|
/linux/net/xfrm/ |
H A D | xfrm_state.c | 464 .encap = XFRM_MODE_BEET, 469 .encap = XFRM_MODE_TRANSPORT, 473 .encap = XFRM_MODE_TUNNEL, 478 .encap = XFRM_MODE_IPTFS, 486 .encap = XFRM_MODE_BEET, 491 .encap = XFRM_MODE_ROUTEOPTIMIZATION, 495 .encap = XFRM_MODE_TRANSPORT, 499 .encap = XFRM_MODE_TUNNEL, 504 .encap = XFRM_MODE_IPTFS, 510 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument [all …]
|
/linux/net/core/ |
H A D | lwtunnel.c | 36 * the encap need to return a string here. in lwtunnel_encap_str() 54 /* module autoload not supported for encap type */ in lwtunnel_encap_str() 114 struct nlattr *encap, unsigned int family, in lwtunnel_build_state() argument 124 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state() 137 ret = ops->build_state(net, encap, family, cfg, lws, extack); in lwtunnel_build_state() 144 NL_SET_ERR_MSG_ATTR(extack, encap, in lwtunnel_build_state()
|
/linux/net/netfilter/ |
H A D | nf_flow_table_offload.c | 120 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[ in nf_flow_rule_route_common() [all...] |
/linux/drivers/net/ethernet/cisco/enic/ |
H A D | enic_rq.c | 107 bool outer_csum_ok = true, encap = false; in enic_rq_set_skb_flags() local 129 encap = true; in enic_rq_set_skb_flags() 135 encap = true; in enic_rq_set_skb_flags() 148 * In case of encap pkt tcp_udp_csum_ok/tcp_udp_csum_ok is in enic_rq_set_skb_flags() 155 skb->csum_level = encap; in enic_rq_set_skb_flags() 156 if (encap) in enic_rq_set_skb_flags()
|