Home
last modified time | relevance | path

Searched refs:tun_info (Results 1 – 25 of 38) sorted by relevance

12

/Linux-v5.15/net/ipv4/
Dip_tunnel_core.c132 md->u.tun_info.mode & IP_TUNNEL_INFO_TX) in iptunnel_metadata_reply()
135 src = &md->u.tun_info; in iptunnel_metadata_reply()
140 dst = &res->u.tun_info; in iptunnel_metadata_reply()
659 struct ip_tunnel_info *tun_info; in ip_tun_build_state() local
671 new_state = lwtunnel_state_alloc(sizeof(*tun_info) + opt_len); in ip_tun_build_state()
677 tun_info = lwt_tun_info(new_state); in ip_tun_build_state()
679 err = ip_tun_set_opts(tb[LWTUNNEL_IP_OPTS], tun_info, extack); in ip_tun_build_state()
686 err = dst_cache_init(&tun_info->dst_cache, GFP_KERNEL); in ip_tun_build_state()
694 tun_info->key.tun_id = nla_get_be64(tb[LWTUNNEL_IP_ID]); in ip_tun_build_state()
697 tun_info->key.u.ipv4.dst = nla_get_in_addr(tb[LWTUNNEL_IP_DST]); in ip_tun_build_state()
[all …]
Dip_tunnel.c548 struct ip_tunnel_info *tun_info; in ip_md_tunnel_xmit() local
557 tun_info = skb_tunnel_info(skb); in ip_md_tunnel_xmit()
558 if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) || in ip_md_tunnel_xmit()
559 ip_tunnel_info_af(tun_info) != AF_INET)) in ip_md_tunnel_xmit()
561 key = &tun_info->key; in ip_md_tunnel_xmit()
577 use_cache = ip_tunnel_dst_cache_usable(skb, tun_info); in ip_md_tunnel_xmit()
579 rt = dst_cache_get_ip4(&tun_info->dst_cache, &fl4.saddr); in ip_md_tunnel_xmit()
587 dst_cache_set_ip4(&tun_info->dst_cache, &rt->dst, in ip_md_tunnel_xmit()
640 struct ip_tunnel_info *tun_info = NULL; in ip_tunnel_xmit() local
666 tun_info = skb_tunnel_info(skb); in ip_tunnel_xmit()
[all …]
Dip_gre.c329 md = ip_tunnel_info_opts(&tun_dst->u.tun_info); in erspan_rcv()
335 info = &tun_dst->u.tun_info; in erspan_rcv()
483 struct ip_tunnel_info *tun_info; in gre_fb_xmit() local
488 tun_info = skb_tunnel_info(skb); in gre_fb_xmit()
489 if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) || in gre_fb_xmit()
490 ip_tunnel_info_af(tun_info) != AF_INET)) in gre_fb_xmit()
493 key = &tun_info->key; in gre_fb_xmit()
500 if (gre_handle_offloads(skb, !!(tun_info->key.tun_flags & TUNNEL_CSUM))) in gre_fb_xmit()
503 flags = tun_info->key.tun_flags & in gre_fb_xmit()
506 tunnel_id_to_key32(tun_info->key.tun_id), in gre_fb_xmit()
[all …]
/Linux-v5.15/include/net/
Ddst_metadata.h23 struct ip_tunnel_info tun_info; member
45 return &md_dst->u.tun_info; in skb_tunnel_info()
82 return memcmp(&a->u.tun_info, &b->u.tun_info, in skb_metadata_dst_cmp()
83 sizeof(a->u.tun_info) + in skb_metadata_dst_cmp()
84 a->u.tun_info.options_len); in skb_metadata_dst_cmp()
105 tun_dst->u.tun_info.options_len = 0; in tun_rx_dst()
106 tun_dst->u.tun_info.mode = 0; in tun_rx_dst()
119 md_size = md_dst->u.tun_info.options_len; in tun_dst_unclone()
124 memcpy(&new_md->u.tun_info, &md_dst->u.tun_info, in tun_dst_unclone()
140 return &dst->u.tun_info; in skb_tunnel_info_unclone()
[all …]
/Linux-v5.15/net/psample/
Dpsample.c215 struct ip_tunnel_info *tun_info) in __psample_ip_tun_to_nlattr() argument
217 unsigned short tun_proto = ip_tunnel_info_af(tun_info); in __psample_ip_tun_to_nlattr()
218 const void *tun_opts = ip_tunnel_info_opts(tun_info); in __psample_ip_tun_to_nlattr()
219 const struct ip_tunnel_key *tun_key = &tun_info->key; in __psample_ip_tun_to_nlattr()
220 int tun_opts_len = tun_info->options_len; in __psample_ip_tun_to_nlattr()
227 if (tun_info->mode & IP_TUNNEL_INFO_BRIDGE && in __psample_ip_tun_to_nlattr()
288 struct ip_tunnel_info *tun_info) in psample_ip_tun_to_nlattr() argument
297 err = __psample_ip_tun_to_nlattr(skb, tun_info); in psample_ip_tun_to_nlattr()
308 static int psample_tunnel_meta_len(struct ip_tunnel_info *tun_info) in psample_tunnel_meta_len() argument
310 unsigned short tun_proto = ip_tunnel_info_af(tun_info); in psample_tunnel_meta_len()
[all …]
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun_geneve.c19 e->tun_info->options_len; in mlx5e_tc_tun_calc_hlen_geneve()
96 const struct ip_tunnel_info *tun_info = e->tun_info; in mlx5e_gen_ip_tunnel_header_geneve() local
104 udp->dest = tun_info->key.tp_dst; in mlx5e_gen_ip_tunnel_header_geneve()
108 geneveh->opt_len = tun_info->options_len / 4; in mlx5e_gen_ip_tunnel_header_geneve()
109 geneveh->oam = !!(tun_info->key.tun_flags & TUNNEL_OAM); in mlx5e_gen_ip_tunnel_header_geneve()
110 geneveh->critical = !!(tun_info->key.tun_flags & TUNNEL_CRIT_OPT); in mlx5e_gen_ip_tunnel_header_geneve()
111 mlx5e_tunnel_id_to_vni(tun_info->key.tun_id, geneveh->vni); in mlx5e_gen_ip_tunnel_header_geneve()
114 if (tun_info->key.tun_flags & TUNNEL_GENEVE_OPT) { in mlx5e_gen_ip_tunnel_header_geneve()
117 ip_tunnel_info_opts_get(geneveh->options, tun_info); in mlx5e_gen_ip_tunnel_header_geneve()
Dtc_tun_encap.c415 kfree(e->tun_info); in mlx5e_encap_dealloc()
555 e_key.ip_tun_key = &e->tun_info->key; in mlx5e_encap_get()
583 struct ip_tunnel_info *mlx5e_dup_tun_info(const struct ip_tunnel_info *tun_info) in mlx5e_dup_tun_info() argument
585 size_t tun_size = sizeof(*tun_info) + tun_info->options_len; in mlx5e_dup_tun_info()
587 return kmemdup(tun_info, tun_size, GFP_KERNEL); in mlx5e_dup_tun_info()
722 const struct ip_tunnel_info *tun_info; in mlx5e_attach_encap() local
732 tun_info = parse_attr->tun_info[out_index]; in mlx5e_attach_encap()
733 family = ip_tunnel_info_af(tun_info); in mlx5e_attach_encap()
734 key.ip_tun_key = &tun_info->key; in mlx5e_attach_encap()
777 tun_info = mlx5e_dup_tun_info(tun_info); in mlx5e_attach_encap()
[all …]
Dtc_tun_gre.c14 return gre_calc_hlen(e->tun_info->key.tun_flags); in mlx5e_tc_tun_calc_hlen_gretap()
31 const struct ip_tunnel_key *tun_key = &e->tun_info->key; in mlx5e_gen_ip_tunnel_header_gretap()
Dtc_tun_vxlan.c65 int dst_port = be16_to_cpu(e->tun_info->key.tp_dst); in mlx5e_tc_tun_init_encap_attr_vxlan()
86 const struct ip_tunnel_key *tun_key = &e->tun_info->key; in mlx5e_gen_ip_tunnel_header_vxlan()
Dtc_tun_encap.h30 struct ip_tunnel_info *mlx5e_dup_tun_info(const struct ip_tunnel_info *tun_info);
Dtc_priv.h34 const struct ip_tunnel_info *tun_info[MLX5_MAX_FLOW_FWD_VPORTS]; member
Dtc_tun_mplsoudp.c32 const struct ip_tunnel_key *tun_key = &r->tun_info->key; in generate_ip_tun_hdr()
/Linux-v5.15/net/netfilter/
Dnft_tunnel.c28 struct ip_tunnel_info *tun_info; in nft_tunnel_get_eval() local
30 tun_info = skb_tunnel_info(pkt->skb); in nft_tunnel_get_eval()
34 if (!tun_info) { in nft_tunnel_get_eval()
40 !(tun_info->mode & IP_TUNNEL_INFO_TX)) || in nft_tunnel_get_eval()
42 (tun_info->mode & IP_TUNNEL_INFO_TX))) in nft_tunnel_get_eval()
48 if (!tun_info) { in nft_tunnel_get_eval()
54 !(tun_info->mode & IP_TUNNEL_INFO_TX)) || in nft_tunnel_get_eval()
56 (tun_info->mode & IP_TUNNEL_INFO_TX))) in nft_tunnel_get_eval()
57 *dest = ntohl(tunnel_id_to_key32(tun_info->key.tun_id)); in nft_tunnel_get_eval()
480 memcpy(&md->u.tun_info, &info, sizeof(info)); in nft_tunnel_obj_init()
[all …]
Dnf_flow_table_offload.c34 struct ip_tunnel_info *tun_info) in nf_flow_rule_lwt_match() argument
40 if (!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX)) in nf_flow_rule_lwt_match()
45 key->enc_key_id.keyid = tunnel_id_to_key32(tun_info->key.tun_id); in nf_flow_rule_lwt_match()
50 if (ip_tunnel_info_af(tun_info) == AF_INET) { in nf_flow_rule_lwt_match()
53 key->enc_ipv4.src = tun_info->key.u.ipv4.dst; in nf_flow_rule_lwt_match()
54 key->enc_ipv4.dst = tun_info->key.u.ipv4.src; in nf_flow_rule_lwt_match()
62 memcpy(&key->enc_ipv6.src, &tun_info->key.u.ipv6.dst, in nf_flow_rule_lwt_match()
64 memcpy(&key->enc_ipv6.dst, &tun_info->key.u.ipv6.src, in nf_flow_rule_lwt_match()
97 struct ip_tunnel_info *tun_info; in nf_flow_rule_match() local
109 tun_info = lwt_tun_info(other_dst->lwtstate); in nf_flow_rule_match()
[all …]
/Linux-v5.15/net/ipv6/
Dip6_gre.c579 info = &tun_dst->u.tun_info; in ip6erspan_rcv()
711 struct ip_tunnel_info *tun_info; in skb_tunnel_info_txcheck() local
713 tun_info = skb_tunnel_info(skb); in skb_tunnel_info_txcheck()
714 if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX))) in skb_tunnel_info_txcheck()
717 return tun_info; in skb_tunnel_info_txcheck()
743 struct ip_tunnel_info *tun_info; in __gre6_xmit() local
747 tun_info = skb_tunnel_info_txcheck(skb); in __gre6_xmit()
748 if (IS_ERR(tun_info) || in __gre6_xmit()
749 unlikely(ip_tunnel_info_af(tun_info) != AF_INET6)) in __gre6_xmit()
752 key = &tun_info->key; in __gre6_xmit()
[all …]
/Linux-v5.15/net/openvswitch/
Dflow.c855 int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info, in ovs_flow_key_extract() argument
865 if (tun_info) { in ovs_flow_key_extract()
866 key->tun_proto = ip_tunnel_info_af(tun_info); in ovs_flow_key_extract()
867 memcpy(&key->tun_key, &tun_info->key, sizeof(key->tun_key)); in ovs_flow_key_extract()
869 if (tun_info->options_len) { in ovs_flow_key_extract()
870 BUILD_BUG_ON((1 << (sizeof(tun_info->options_len) * in ovs_flow_key_extract()
874 ip_tunnel_info_opts_get(TUN_METADATA_OPTS(key, tun_info->options_len), in ovs_flow_key_extract()
875 tun_info); in ovs_flow_key_extract()
876 key->tun_opts_len = tun_info->options_len; in ovs_flow_key_extract()
Dvport.c431 const struct ip_tunnel_info *tun_info) in ovs_vport_receive() argument
445 tun_info = NULL; in ovs_vport_receive()
449 error = ovs_flow_key_extract(tun_info, skb, &key); in ovs_vport_receive()
Dflow_netlink.c954 struct ip_tunnel_info *tun_info) in ovs_nla_put_tunnel_info() argument
956 return __ip_tun_to_nlattr(skb, &tun_info->key, in ovs_nla_put_tunnel_info()
957 ip_tunnel_info_opts(tun_info), in ovs_nla_put_tunnel_info()
958 tun_info->options_len, in ovs_nla_put_tunnel_info()
959 ip_tunnel_info_af(tun_info), tun_info->mode); in ovs_nla_put_tunnel_info()
2642 struct ip_tunnel_info *tun_info; in validate_and_copy_set_tun() local
2681 err = dst_cache_init(&tun_dst->u.tun_info.dst_cache, GFP_KERNEL); in validate_and_copy_set_tun()
2697 tun_info = &tun_dst->u.tun_info; in validate_and_copy_set_tun()
2698 tun_info->mode = IP_TUNNEL_INFO_TX; in validate_and_copy_set_tun()
2700 tun_info->mode |= IP_TUNNEL_INFO_IPV6; in validate_and_copy_set_tun()
[all …]
Dflow_netlink.h50 struct ip_tunnel_info *tun_info);
/Linux-v5.15/drivers/net/ethernet/netronome/nfp/flower/
Dtunnel_conf.c55 } tun_info[]; member
76 } tun_info[]; member
245 if (pay_len != struct_size(payload, tun_info, count)) { in nfp_tunnel_keep_alive()
252 ipv4_addr = payload->tun_info[i].ipv4; in nfp_tunnel_keep_alive()
253 port = be32_to_cpu(payload->tun_info[i].egress_port); in nfp_tunnel_keep_alive()
287 if (pay_len != struct_size(payload, tun_info, count)) { in nfp_tunnel_keep_alive_v6()
294 ipv6_add = &payload->tun_info[i].ipv6; in nfp_tunnel_keep_alive_v6()
295 port = be32_to_cpu(payload->tun_info[i].egress_port); in nfp_tunnel_keep_alive_v6()
/Linux-v5.15/net/sched/
Dact_tunnel_key.c476 ret = dst_cache_init(&metadata->u.tun_info.dst_cache, GFP_KERNEL); in tunnel_key_init()
483 &metadata->u.tun_info, in tunnel_key_init()
489 metadata->u.tun_info.mode |= IP_TUNNEL_INFO_TX; in tunnel_key_init()
736 &params->tcft_enc_metadata->u.tun_info; in tunnel_key_dump()
743 &params->tcft_enc_metadata->u.tun_info) || in tunnel_key_dump()
/Linux-v5.15/include/net/tc_act/
Dtc_tunnel_key.h64 return &params->tcft_enc_metadata->u.tun_info; in tcf_tunnel_info()
/Linux-v5.15/net/core/
Ddst.c317 dst_cache_destroy(&md_dst->u.tun_info.dst_cache); in metadata_dst_free()
350 dst_cache_destroy(&one_md_dst->u.tun_info.dst_cache); in metadata_dst_free_percpu()
/Linux-v5.15/drivers/net/ethernet/mellanox/mlx5/core/
Den_rep.h194 const struct ip_tunnel_info *tun_info; member
/Linux-v5.15/net/bridge/
Dbr_vlan_tunnel.c78 metadata->u.tun_info.mode |= IP_TUNNEL_INFO_TX | IP_TUNNEL_INFO_BRIDGE; in __vlan_tunnel_info_add()

12