Searched refs:tun_info (Results 1 - 15 of 15) sorted by relevance

/linux-4.4.14/include/net/
H A Ddst_metadata.h11 struct ip_tunnel_info tun_info; member in union:metadata_dst::__anon13400
31 return &md_dst->u.tun_info; skb_tunnel_info()
58 if (!a != !b || a->u.tun_info.options_len != b->u.tun_info.options_len) skb_metadata_dst_cmp()
61 return memcmp(&a->u.tun_info, &b->u.tun_info, skb_metadata_dst_cmp()
62 sizeof(a->u.tun_info) + a->u.tun_info.options_len); skb_metadata_dst_cmp()
76 tun_dst->u.tun_info.options_len = 0; tun_rx_dst()
77 tun_dst->u.tun_info.mode = 0; tun_rx_dst()
90 md_size = md_dst->u.tun_info.options_len; tun_dst_unclone()
95 memcpy(&new_md->u.tun_info, &md_dst->u.tun_info, tun_dst_unclone()
111 return &dst->u.tun_info; skb_tunnel_info_unclone()
126 ip_tunnel_key_init(&tun_dst->u.tun_info.key, ip_tun_rx_dst()
145 info = &tun_dst->u.tun_info; ipv6_tun_rx_dst()
H A Dip_tunnels.h211 *tun_info) ip_tunnel_info_af()
213 return tun_info->mode & IP_TUNNEL_INFO_IPV6 ? AF_INET6 : AF_INET; ip_tunnel_info_af()
210 ip_tunnel_info_af(const struct ip_tunnel_info *tun_info) ip_tunnel_info_af() argument
/linux-4.4.14/net/ipv4/
H A Dip_tunnel_core.c129 if (!md || md->u.tun_info.mode & IP_TUNNEL_INFO_TX) iptunnel_metadata_reply()
136 dst = &res->u.tun_info; iptunnel_metadata_reply()
137 src = &md->u.tun_info; iptunnel_metadata_reply()
236 struct ip_tunnel_info *tun_info; ip_tun_build_state() local
245 new_state = lwtunnel_state_alloc(sizeof(*tun_info)); ip_tun_build_state()
251 tun_info = lwt_tun_info(new_state); ip_tun_build_state()
254 tun_info->key.tun_id = nla_get_u64(tb[LWTUNNEL_IP_ID]); ip_tun_build_state()
257 tun_info->key.u.ipv4.dst = nla_get_be32(tb[LWTUNNEL_IP_DST]); ip_tun_build_state()
260 tun_info->key.u.ipv4.src = nla_get_be32(tb[LWTUNNEL_IP_SRC]); ip_tun_build_state()
263 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP_TTL]); ip_tun_build_state()
266 tun_info->key.tos = nla_get_u8(tb[LWTUNNEL_IP_TOS]); ip_tun_build_state()
269 tun_info->key.tun_flags = nla_get_u16(tb[LWTUNNEL_IP_FLAGS]); ip_tun_build_state()
271 tun_info->mode = IP_TUNNEL_INFO_TX; ip_tun_build_state()
272 tun_info->options_len = 0; ip_tun_build_state()
282 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); ip_tun_fill_encap_info() local
284 if (nla_put_u64(skb, LWTUNNEL_IP_ID, tun_info->key.tun_id) || ip_tun_fill_encap_info()
285 nla_put_be32(skb, LWTUNNEL_IP_DST, tun_info->key.u.ipv4.dst) || ip_tun_fill_encap_info()
286 nla_put_be32(skb, LWTUNNEL_IP_SRC, tun_info->key.u.ipv4.src) || ip_tun_fill_encap_info()
287 nla_put_u8(skb, LWTUNNEL_IP_TOS, tun_info->key.tos) || ip_tun_fill_encap_info()
288 nla_put_u8(skb, LWTUNNEL_IP_TTL, tun_info->key.ttl) || ip_tun_fill_encap_info()
289 nla_put_u16(skb, LWTUNNEL_IP_FLAGS, tun_info->key.tun_flags)) ip_tun_fill_encap_info()
331 struct ip_tunnel_info *tun_info; ip6_tun_build_state() local
340 new_state = lwtunnel_state_alloc(sizeof(*tun_info)); ip6_tun_build_state()
346 tun_info = lwt_tun_info(new_state); ip6_tun_build_state()
349 tun_info->key.tun_id = nla_get_u64(tb[LWTUNNEL_IP6_ID]); ip6_tun_build_state()
352 tun_info->key.u.ipv6.dst = nla_get_in6_addr(tb[LWTUNNEL_IP6_DST]); ip6_tun_build_state()
355 tun_info->key.u.ipv6.src = nla_get_in6_addr(tb[LWTUNNEL_IP6_SRC]); ip6_tun_build_state()
358 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP6_HOPLIMIT]); ip6_tun_build_state()
361 tun_info->key.tos = nla_get_u8(tb[LWTUNNEL_IP6_TC]); ip6_tun_build_state()
364 tun_info->key.tun_flags = nla_get_u16(tb[LWTUNNEL_IP6_FLAGS]); ip6_tun_build_state()
366 tun_info->mode = IP_TUNNEL_INFO_TX | IP_TUNNEL_INFO_IPV6; ip6_tun_build_state()
367 tun_info->options_len = 0; ip6_tun_build_state()
377 struct ip_tunnel_info *tun_info = lwt_tun_info(lwtstate); ip6_tun_fill_encap_info() local
379 if (nla_put_u64(skb, LWTUNNEL_IP6_ID, tun_info->key.tun_id) || ip6_tun_fill_encap_info()
380 nla_put_in6_addr(skb, LWTUNNEL_IP6_DST, &tun_info->key.u.ipv6.dst) || ip6_tun_fill_encap_info()
381 nla_put_in6_addr(skb, LWTUNNEL_IP6_SRC, &tun_info->key.u.ipv6.src) || ip6_tun_fill_encap_info()
382 nla_put_u8(skb, LWTUNNEL_IP6_HOPLIMIT, tun_info->key.tos) || ip6_tun_fill_encap_info()
383 nla_put_u8(skb, LWTUNNEL_IP6_TC, tun_info->key.ttl) || ip6_tun_fill_encap_info()
384 nla_put_u16(skb, LWTUNNEL_IP6_FLAGS, tun_info->key.tun_flags)) ip6_tun_fill_encap_info()
H A Dip_gre.c525 struct ip_tunnel_info *tun_info; gre_fb_xmit() local
534 tun_info = skb_tunnel_info(skb); gre_fb_xmit()
535 if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) || gre_fb_xmit()
536 ip_tunnel_info_af(tun_info) != AF_INET)) gre_fb_xmit()
539 key = &tun_info->key; gre_fb_xmit()
559 skb = gre_handle_offloads(skb, !!(tun_info->key.tun_flags & TUNNEL_CSUM)); gre_fb_xmit()
565 flags = tun_info->key.tun_flags & (TUNNEL_CSUM | TUNNEL_KEY); gre_fb_xmit()
567 tunnel_id_to_key(tun_info->key.tun_id), 0); gre_fb_xmit()
H A Dudp_tunnel.c122 info = &tun_dst->u.tun_info; udp_tun_rx_dst()
H A Droute.c1774 struct ip_tunnel_info *tun_info; ip_route_input_slow() local
1792 tun_info = skb_tunnel_info(skb); ip_route_input_slow()
1793 if (tun_info && !(tun_info->mode & IP_TUNNEL_INFO_TX)) ip_route_input_slow()
1794 fl4.flowi4_tun_key.tun_id = tun_info->key.tun_id; ip_route_input_slow()
/linux-4.4.14/net/openvswitch/
H A Dflow.c696 int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info, ovs_flow_key_extract() argument
700 if (tun_info) { ovs_flow_key_extract()
701 key->tun_proto = ip_tunnel_info_af(tun_info); ovs_flow_key_extract()
702 memcpy(&key->tun_key, &tun_info->key, sizeof(key->tun_key)); ovs_flow_key_extract()
704 if (tun_info->options_len) { ovs_flow_key_extract()
705 BUILD_BUG_ON((1 << (sizeof(tun_info->options_len) * ovs_flow_key_extract()
709 ip_tunnel_info_opts_get(TUN_METADATA_OPTS(key, tun_info->options_len), ovs_flow_key_extract()
710 tun_info); ovs_flow_key_extract()
711 key->tun_opts_len = tun_info->options_len; ovs_flow_key_extract()
H A Dflow_netlink.h60 struct ip_tunnel_info *tun_info);
H A Dflow_netlink.c802 struct ip_tunnel_info *tun_info) ovs_nla_put_tunnel_info()
804 return __ip_tun_to_nlattr(skb, &tun_info->key, ovs_nla_put_tunnel_info()
805 ip_tunnel_info_opts(tun_info), ovs_nla_put_tunnel_info()
806 tun_info->options_len, ovs_nla_put_tunnel_info()
807 ip_tunnel_info_af(tun_info)); ovs_nla_put_tunnel_info()
1932 struct ip_tunnel_info *tun_info; validate_and_copy_set_tun() local
1972 tun_info = &tun_dst->u.tun_info; validate_and_copy_set_tun()
1973 tun_info->mode = IP_TUNNEL_INFO_TX; validate_and_copy_set_tun()
1975 tun_info->mode |= IP_TUNNEL_INFO_IPV6; validate_and_copy_set_tun()
1976 tun_info->key = key.tun_key; validate_and_copy_set_tun()
1980 * it to tun_info and then point there. validate_and_copy_set_tun()
1982 ip_tunnel_info_opts_set(tun_info, validate_and_copy_set_tun()
2431 struct ip_tunnel_info *tun_info = &ovs_tun->tun_dst->u.tun_info; set_action_to_attr() local
2437 err = ip_tun_to_nlattr(skb, &tun_info->key, set_action_to_attr()
2438 ip_tunnel_info_opts(tun_info), set_action_to_attr()
2439 tun_info->options_len, set_action_to_attr()
2440 ip_tunnel_info_af(tun_info)); set_action_to_attr()
801 ovs_nla_put_tunnel_info(struct sk_buff *skb, struct ip_tunnel_info *tun_info) ovs_nla_put_tunnel_info() argument
H A Dvport.c440 const struct ip_tunnel_info *tun_info) ovs_vport_receive()
453 tun_info = NULL; ovs_vport_receive()
457 error = ovs_flow_key_extract(tun_info, skb, &key); ovs_vport_receive()
439 ovs_vport_receive(struct vport *vport, struct sk_buff *skb, const struct ip_tunnel_info *tun_info) ovs_vport_receive() argument
H A Dflow.h221 int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
/linux-4.4.14/net/ipv6/
H A Droute.c1154 struct ip_tunnel_info *tun_info; ip6_route_input() local
1164 tun_info = skb_tunnel_info(skb); ip6_route_input()
1165 if (tun_info && !(tun_info->mode & IP_TUNNEL_INFO_TX)) ip6_route_input()
1166 fl6.flowi6_tun_key.tun_id = tun_info->key.tun_id; ip6_route_input()
/linux-4.4.14/drivers/net/
H A Dvxlan.c1295 md = ip_tunnel_info_opts(&tun_dst->u.tun_info); vxlan_udp_encap_recv()
1310 tun_dst->u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT; vxlan_udp_encap_recv()
1311 tun_dst->u.tun_info.options_len = sizeof(*md); vxlan_udp_encap_recv()
H A Dgeneve.c214 ip_tunnel_info_opts_set(&tun_dst->u.tun_info, geneve_rx()
/linux-4.4.14/net/core/
H A Dfilter.c1603 info = &md->u.tun_info; bpf_skb_set_tunnel_key()

Completed in 379 milliseconds