Home
last modified time | relevance | path

Searched refs:tun_id (Results 1 – 25 of 34) sorted by relevance

12

/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun_geneve.c79 static void mlx5e_tunnel_id_to_vni(__be64 tun_id, __u8 *vni) in mlx5e_tunnel_id_to_vni() argument
82 vni[0] = (__force __u8)(tun_id >> 16); in mlx5e_tunnel_id_to_vni()
83 vni[1] = (__force __u8)(tun_id >> 8); in mlx5e_tunnel_id_to_vni()
84 vni[2] = (__force __u8)tun_id; in mlx5e_tunnel_id_to_vni()
86 vni[0] = (__force __u8)((__force u64)tun_id >> 40); in mlx5e_tunnel_id_to_vni()
87 vni[1] = (__force __u8)((__force u64)tun_id >> 48); in mlx5e_tunnel_id_to_vni()
88 vni[2] = (__force __u8)((__force u64)tun_id >> 56); in mlx5e_tunnel_id_to_vni()
111 mlx5e_tunnel_id_to_vni(tun_info->key.tun_id, geneveh->vni); in mlx5e_gen_ip_tunnel_header_geneve()
Dtc_tun_gre.c33 __be32 tun_id = tunnel_id_to_key32(tun_key->tun_id); in mlx5e_gen_ip_tunnel_header_gretap() local
49 *ptr = tun_id; in mlx5e_gen_ip_tunnel_header_gretap()
Dtc_tun_vxlan.c88 __be32 tun_id = tunnel_id_to_key32(tun_key->tun_id); in mlx5e_gen_ip_tunnel_header_vxlan() local
101 vxh->vx_vni = vxlan_vni_field(tun_id); in mlx5e_gen_ip_tunnel_header_vxlan()
/linux-6.6.21/net/bridge/
Dbr_vlan_tunnel.c64 struct net_bridge_vlan *vlan, u32 tun_id) in __vlan_tunnel_info_add() argument
67 __be64 key = key32_to_tunnel_id(cpu_to_be32(tun_id)); in __vlan_tunnel_info_add()
98 u32 tun_id) in nbp_vlan_tunnel_info_add() argument
110 return __vlan_tunnel_info_add(vg, vlan, tun_id); in nbp_vlan_tunnel_info_add()
176 vlan = br_vlan_tunnel_lookup(&vg->tunnel_hash, tinfo->key.tun_id); in br_handle_ingress_vlan_tunnel()
Dbr_private_tunnel.h33 u16 vid, u32 tun_id, bool *changed);
41 u32 tun_id);
63 u16 vid, u32 tun_id) in nbp_vlan_tunnel_info_add() argument
Dbr_netlink_tunnel.c200 u16 vid, u32 tun_id, bool *changed) in br_vlan_tunnel_info() argument
209 err = nbp_vlan_tunnel_info_add(p, vid, tun_id); in br_vlan_tunnel_info()
226 u32 tun_id; in br_parse_vlan_tunnel_info() local
241 tun_id = nla_get_u32(tb[IFLA_BRIDGE_VLAN_TUNNEL_ID]); in br_parse_vlan_tunnel_info()
249 tinfo->tunid = tun_id; in br_parse_vlan_tunnel_info()
Dbr_vlan_options.c144 u32 tun_id = 0; in br_vlan_modify_tunnel() local
174 tun_id = nla_get_u32(tun_tb[BRIDGE_VLANDB_TINFO_ID]); in br_vlan_modify_tunnel()
181 tun_id += v->vid - vinfo->vid; in br_vlan_modify_tunnel()
190 return br_vlan_tunnel_info(p, cmd, v->vid, tun_id, changed); in br_vlan_modify_tunnel()
/linux-6.6.21/include/net/
Dip_tunnels.h40 __be64 tun_id; member
186 __be64 tun_id, __be16 tun_flags) in ip_tunnel_key_init() argument
188 key->tun_id = tun_id; in ip_tunnel_key_init()
241 static inline __be32 tunnel_id_to_key32(__be64 tun_id) in tunnel_id_to_key32() argument
244 return (__force __be32)tun_id; in tunnel_id_to_key32()
246 return (__force __be32)((__force u64)tun_id >> 32); in tunnel_id_to_key32()
Dflow.h27 __be64 tun_id; member
109 fl4->flowi4_tun_key.tun_id = 0; in flowi4_init_output()
Dfib_rules.h33 __be64 tun_id; member
Ddst_metadata.h247 info->key.tun_id = tunnel_id; in __ipv6_tun_set_dst()
/linux-6.6.21/net/core/
Dfib_rules.c39 if (rule->iifindex || rule->oifindex || rule->mark || rule->tun_id || in fib_rule_matchall()
274 if (rule->tun_id && (rule->tun_id != fl->flowi_tun_key.tun_id)) in fib_rule_match()
457 if (rule->tun_id && r->tun_id != rule->tun_id) in rule_find()
595 nlrule->tun_id = nla_get_be64(tb[FRA_TUN_ID]); in fib_nl2rule()
719 if (r->tun_id != rule->tun_id) in rule_exists()
866 if (rule->tun_id) in fib_nl_newrule()
933 if (rule->tun_id) in fib_nl_delrule()
1060 (rule->tun_id && in fib_nl_fill_rule()
1061 nla_put_be64(skb, FRA_TUN_ID, rule->tun_id, FRA_PAD)) || in fib_nl_fill_rule()
/linux-6.6.21/drivers/net/
Dgeneve.c108 static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni) in tunnel_id_to_vni() argument
111 vni[0] = (__force __u8)(tun_id >> 16); in tunnel_id_to_vni()
112 vni[1] = (__force __u8)(tun_id >> 8); in tunnel_id_to_vni()
113 vni[2] = (__force __u8)tun_id; in tunnel_id_to_vni()
115 vni[0] = (__force __u8)((__force u64)tun_id >> 40); in tunnel_id_to_vni()
116 vni[1] = (__force __u8)((__force u64)tun_id >> 48); in tunnel_id_to_vni()
117 vni[2] = (__force __u8)((__force u64)tun_id >> 56); in tunnel_id_to_vni()
121 static bool eq_tun_id_and_vni(u8 *tun_id, u8 *vni) in eq_tun_id_and_vni() argument
123 return !memcmp(vni, &tun_id[5], 3); in eq_tun_id_and_vni()
142 if (eq_tun_id_and_vni((u8 *)&node->geneve->cfg.info.key.tun_id, vni) && in geneve_lookup()
[all …]
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/flower/
Dcmsg.h223 __be64 tun_id __packed;
448 __be32 tun_id; member
484 __be32 tun_id; member
Dmatch.c508 nfp_flower_compile_tun_udp_key(&ext->tun_id, &msk->tun_id, rule); in nfp_flower_compile_ipv4_udp_tun()
518 nfp_flower_compile_tun_udp_key(&ext->tun_id, &msk->tun_id, rule); in nfp_flower_compile_ipv6_udp_tun()
Daction.c446 set_tun->tun_id = ip_tun->key.tun_id; in nfp_fl_set_tun()
/linux-6.6.21/net/ipv4/
Dip_gre.c309 __be64 tun_id; in erspan_rcv() local
314 tun_id = key32_to_tunnel_id(tpi->key); in erspan_rcv()
317 tun_id, sizeof(*md)); in erspan_rcv()
380 __be64 tun_id; in __ipgre_rcv() local
383 tun_id = key32_to_tunnel_id(tpi->key); in __ipgre_rcv()
384 tun_dst = ip_tun_rx_dst(skb, flags, tun_id, 0); in __ipgre_rcv()
504 tunnel_id_to_key32(tun_info->key.tun_id), in gre_fb_xmit()
573 erspan_build_header(skb, ntohl(tunnel_id_to_key32(key->tun_id)), in erspan_fb_xmit()
578 ntohl(tunnel_id_to_key32(key->tun_id)), in erspan_fb_xmit()
611 tunnel_id_to_key32(key->tun_id), in gre_fill_metadata_dst()
Dip_tunnel_core.c141 dst->key.tun_id = src->key.tun_id; in iptunnel_metadata_reply()
694 tun_info->key.tun_id = nla_get_be64(tb[LWTUNNEL_IP_ID]); in ip_tun_build_state()
843 if (nla_put_be64(skb, LWTUNNEL_IP_ID, tun_info->key.tun_id, in ip_tun_fill_encap_info()
973 tun_info->key.tun_id = nla_get_be64(tb[LWTUNNEL_IP6_ID]); in ip6_tun_build_state()
1005 if (nla_put_be64(skb, LWTUNNEL_IP6_ID, tun_info->key.tun_id, in ip6_tun_fill_encap_info()
/linux-6.6.21/net/ipv6/
Dip6_gre.c500 __be64 tun_id; in ip6gre_rcv() local
504 tun_id = key32_to_tunnel_id(tpi->key); in ip6gre_rcv()
506 tun_dst = ipv6_tun_rx_dst(skb, flags, tun_id, 0); in ip6gre_rcv()
554 __be64 tun_id; in ip6erspan_rcv() local
559 tun_id = key32_to_tunnel_id(tpi->key); in ip6erspan_rcv()
561 tun_dst = ipv6_tun_rx_dst(skb, flags, tun_id, in ip6erspan_rcv()
778 fl6->fl6_gre_key = tunnel_id_to_key32(key->tun_id); in __gre6_xmit()
790 tunnel_id_to_key32(tun_info->key.tun_id), in __gre6_xmit()
991 __be32 tun_id; in ip6erspan_tunnel_xmit() local
1004 fl6.fl6_gre_key = tunnel_id_to_key32(key->tun_id); in ip6erspan_tunnel_xmit()
[all …]
/linux-6.6.21/net/netfilter/
Dnft_tunnel.c58 *dest = ntohl(tunnel_id_to_key32(tun_info->key.tun_id)); in nft_tunnel_get_eval()
456 info.key.tun_id = key32_to_tunnel_id(nla_get_be32(tb[NFTA_TUNNEL_KEY_ID])); in nft_tunnel_obj_init()
681 tunnel_id_to_key32(info->key.tun_id)) || in nft_tunnel_obj_dump()
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/
Den_tc.c2142 u32 tun_id, enc_opts_id = 0; in mlx5e_get_flow_tunnel_id() local
2167 err = mapping_add(uplink_priv->tunnel_mapping, &tunnel_key, &tun_id); in mlx5e_get_flow_tunnel_id()
2192 value = tun_id << ENC_OPTS_BITS | enc_opts_id; in mlx5e_get_flow_tunnel_id()
2218 mapping_remove(uplink_priv->tunnel_mapping, tun_id); in mlx5e_get_flow_tunnel_id()
2225 u32 tun_id = flow->attr->tunnel_id >> ENC_OPTS_BITS; in mlx5e_put_flow_tunnel_id() local
2234 if (tun_id) in mlx5e_put_flow_tunnel_id()
2235 mapping_remove(uplink_priv->tunnel_mapping, tun_id); in mlx5e_put_flow_tunnel_id()
5484 u32 tun_id, enc_opts_id; in mlx5e_tc_restore_tunnel() local
5489 tun_id = tunnel_id >> ENC_OPTS_BITS; in mlx5e_tc_restore_tunnel()
5491 if (!tun_id) in mlx5e_tc_restore_tunnel()
[all …]
/linux-6.6.21/drivers/net/ethernet/sfc/
Dtc_encap_actions.c325 vxlan->vx_vni = vxlan_vni_field(tunnel_id_to_key32(key->tun_id)); in efx_gen_tun_header_vxlan()
341 vni = ntohl(tunnel_id_to_key32(key->tun_id)); in efx_gen_tun_header_geneve()
/linux-6.6.21/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_tc.c484 flow->tun_key.tun_id = key32_to_tunnel_id(match.key->keyid); in bnxt_tc_parse_flow()
485 flow->tun_mask.tun_id = key32_to_tunnel_id(match.mask->keyid); in bnxt_tc_parse_flow()
814 req->tunnel_id = tunnel_id_to_key32(tun_key->tun_id); in hwrm_cfa_decap_filter_alloc()
914 encap->vni = tunnel_id_to_key32(encap_key->tun_id); in hwrm_cfa_encap_record_alloc()
/linux-6.6.21/net/psample/
Dpsample.c225 nla_put_be64(skb, PSAMPLE_TUNNEL_KEY_ATTR_ID, tun_key->tun_id, in __psample_ip_tun_to_nlattr()
/linux-6.6.21/net/sched/
Dact_tunnel_key.c742 __be32 key_id = tunnel_id_to_key32(key->tun_id); in tunnel_key_dump()

12