/kernel/linux/linux-5.10/net/ipv4/ |
D | ip_tunnel_core.c | 132 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() 667 struct ip_tunnel_info *tun_info; in ip_tun_build_state() local 679 new_state = lwtunnel_state_alloc(sizeof(*tun_info) + opt_len); in ip_tun_build_state() 685 tun_info = lwt_tun_info(new_state); in ip_tun_build_state() 687 err = ip_tun_set_opts(tb[LWTUNNEL_IP_OPTS], tun_info, extack); in ip_tun_build_state() 694 err = dst_cache_init(&tun_info->dst_cache, GFP_KERNEL); in ip_tun_build_state() 702 tun_info->key.tun_id = nla_get_be64(tb[LWTUNNEL_IP_ID]); in ip_tun_build_state() 705 tun_info->key.u.ipv4.dst = nla_get_in_addr(tb[LWTUNNEL_IP_DST]); in ip_tun_build_state() [all …]
|
D | ip_tunnel.c | 548 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 …]
|
D | ip_gre.c | 327 md = ip_tunnel_info_opts(&tun_dst->u.tun_info); in erspan_rcv() 333 info = &tun_dst->u.tun_info; in erspan_rcv() 478 struct ip_tunnel_info *tun_info; in gre_fb_xmit() local 483 tun_info = skb_tunnel_info(skb); in gre_fb_xmit() 484 if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) || in gre_fb_xmit() 485 ip_tunnel_info_af(tun_info) != AF_INET)) in gre_fb_xmit() 488 key = &tun_info->key; in gre_fb_xmit() 495 if (gre_handle_offloads(skb, !!(tun_info->key.tun_flags & TUNNEL_CSUM))) in gre_fb_xmit() 498 flags = tun_info->key.tun_flags & in gre_fb_xmit() 501 tunnel_id_to_key32(tun_info->key.tun_id), in gre_fb_xmit() [all …]
|
/kernel/linux/linux-5.10/include/net/ |
D | dst_metadata.h | 23 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 …]
|
D | ip_tunnels.h | 214 *tun_info) in ip_tunnel_info_af() 216 return tun_info->mode & IP_TUNNEL_INFO_IPV6 ? AF_INET6 : AF_INET; in ip_tunnel_info_af()
|
/kernel/linux/linux-5.10/net/psample/ |
D | psample.c | 214 struct ip_tunnel_info *tun_info) in __psample_ip_tun_to_nlattr() argument 216 unsigned short tun_proto = ip_tunnel_info_af(tun_info); in __psample_ip_tun_to_nlattr() 217 const void *tun_opts = ip_tunnel_info_opts(tun_info); in __psample_ip_tun_to_nlattr() 218 const struct ip_tunnel_key *tun_key = &tun_info->key; in __psample_ip_tun_to_nlattr() 219 int tun_opts_len = tun_info->options_len; in __psample_ip_tun_to_nlattr() 226 if (tun_info->mode & IP_TUNNEL_INFO_BRIDGE && in __psample_ip_tun_to_nlattr() 287 struct ip_tunnel_info *tun_info) in psample_ip_tun_to_nlattr() argument 296 err = __psample_ip_tun_to_nlattr(skb, tun_info); in psample_ip_tun_to_nlattr() 307 static int psample_tunnel_meta_len(struct ip_tunnel_info *tun_info) in psample_tunnel_meta_len() argument 309 unsigned short tun_proto = ip_tunnel_info_af(tun_info); in psample_tunnel_meta_len() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | tc_tun_geneve.c | 19 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()
|
D | tc_tun_gre.c | 14 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()
|
D | tc_tun_vxlan.c | 65 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()
|
D | tc_tun_mplsoudp.c | 32 const struct ip_tunnel_key *tun_key = &r->tun_info->key; in generate_ip_tun_hdr()
|
/kernel/linux/linux-5.10/net/netfilter/ |
D | nf_flow_table_offload.c | 32 struct ip_tunnel_info *tun_info) in nf_flow_rule_lwt_match() argument 38 if (!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX)) in nf_flow_rule_lwt_match() 43 key->enc_key_id.keyid = tunnel_id_to_key32(tun_info->key.tun_id); in nf_flow_rule_lwt_match() 48 if (ip_tunnel_info_af(tun_info) == AF_INET) { in nf_flow_rule_lwt_match() 51 key->enc_ipv4.src = tun_info->key.u.ipv4.dst; in nf_flow_rule_lwt_match() 52 key->enc_ipv4.dst = tun_info->key.u.ipv4.src; in nf_flow_rule_lwt_match() 60 memcpy(&key->enc_ipv6.src, &tun_info->key.u.ipv6.dst, in nf_flow_rule_lwt_match() 62 memcpy(&key->enc_ipv6.dst, &tun_info->key.u.ipv6.src, in nf_flow_rule_lwt_match() 85 struct ip_tunnel_info *tun_info; in nf_flow_rule_match() local 96 tun_info = lwt_tun_info(other_dst->lwtstate); in nf_flow_rule_match() [all …]
|
D | nft_tunnel.c | 28 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() 482 memcpy(&md->u.tun_info, &info, sizeof(info)); in nft_tunnel_obj_init() [all …]
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | ip6_gre.c | 579 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 …]
|
/kernel/linux/linux-5.10/net/openvswitch/ |
D | flow.c | 850 int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info, in ovs_flow_key_extract() argument 859 if (tun_info) { in ovs_flow_key_extract() 860 key->tun_proto = ip_tunnel_info_af(tun_info); in ovs_flow_key_extract() 861 memcpy(&key->tun_key, &tun_info->key, sizeof(key->tun_key)); in ovs_flow_key_extract() 863 if (tun_info->options_len) { in ovs_flow_key_extract() 864 BUILD_BUG_ON((1 << (sizeof(tun_info->options_len) * in ovs_flow_key_extract() 868 ip_tunnel_info_opts_get(TUN_METADATA_OPTS(key, tun_info->options_len), in ovs_flow_key_extract() 869 tun_info); in ovs_flow_key_extract() 870 key->tun_opts_len = tun_info->options_len; in ovs_flow_key_extract()
|
D | vport.c | 429 const struct ip_tunnel_info *tun_info) in ovs_vport_receive() argument 443 tun_info = NULL; in ovs_vport_receive() 447 error = ovs_flow_key_extract(tun_info, skb, &key); in ovs_vport_receive()
|
D | flow_netlink.c | 954 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() 2632 struct ip_tunnel_info *tun_info; in validate_and_copy_set_tun() local 2671 err = dst_cache_init(&tun_dst->u.tun_info.dst_cache, GFP_KERNEL); in validate_and_copy_set_tun() 2687 tun_info = &tun_dst->u.tun_info; in validate_and_copy_set_tun() 2688 tun_info->mode = IP_TUNNEL_INFO_TX; in validate_and_copy_set_tun() 2690 tun_info->mode |= IP_TUNNEL_INFO_IPV6; in validate_and_copy_set_tun() [all …]
|
D | flow_netlink.h | 50 struct ip_tunnel_info *tun_info);
|
D | flow.h | 276 int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
|
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/flower/ |
D | tunnel_conf.c | 55 } 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()
|
/kernel/linux/linux-5.10/net/sched/ |
D | act_tunnel_key.c | 476 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 ¶ms->tcft_enc_metadata->u.tun_info; in tunnel_key_dump() 743 ¶ms->tcft_enc_metadata->u.tun_info) || in tunnel_key_dump()
|
/kernel/linux/linux-5.10/include/net/tc_act/ |
D | tc_tunnel_key.h | 64 return ¶ms->tcft_enc_metadata->u.tun_info; in tcf_tunnel_info()
|
/kernel/linux/linux-5.10/net/core/ |
D | dst.c | 319 dst_cache_destroy(&md_dst->u.tun_info.dst_cache); in metadata_dst_free() 352 dst_cache_destroy(&one_md_dst->u.tun_info.dst_cache); in metadata_dst_free_percpu()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_rep.h | 185 const struct ip_tunnel_info *tun_info; member
|
D | en_tc.c | 151 const struct ip_tunnel_info *tun_info[MLX5_MAX_FLOW_FWD_VPORTS]; member 1490 kfree(attr->parse_attr->tun_info[out_index]); in mlx5e_tc_del_fdb_flow() 1780 kfree(e->tun_info); in mlx5e_encap_dealloc() 3722 e_key.ip_tun_key = &e->tun_info->key; in mlx5e_encap_get() 3750 static struct ip_tunnel_info *dup_tun_info(const struct ip_tunnel_info *tun_info) in dup_tun_info() argument 3752 size_t tun_size = sizeof(*tun_info) + tun_info->options_len; in dup_tun_info() 3754 return kmemdup(tun_info, tun_size, GFP_KERNEL); in dup_tun_info() 3787 const struct ip_tunnel_info *tun_info; in mlx5e_attach_encap() local 3795 tun_info = parse_attr->tun_info[out_index]; in mlx5e_attach_encap() 3796 family = ip_tunnel_info_af(tun_info); in mlx5e_attach_encap() [all …]
|
/kernel/linux/linux-5.10/net/bridge/ |
D | br_vlan_tunnel.c | 78 metadata->u.tun_info.mode |= IP_TUNNEL_INFO_TX | IP_TUNNEL_INFO_BRIDGE; in __vlan_tunnel_info_add()
|