Lines Matching refs:parms
133 if (!ipv6_addr_equal(local, &t->parms.laddr) || in ip6gre_tunnel_lookup()
134 !ipv6_addr_equal(remote, &t->parms.raddr) || in ip6gre_tunnel_lookup()
135 key != t->parms.i_key || in ip6gre_tunnel_lookup()
144 if (t->parms.link != link) in ip6gre_tunnel_lookup()
158 if (!ipv6_addr_equal(remote, &t->parms.raddr) || in ip6gre_tunnel_lookup()
159 key != t->parms.i_key || in ip6gre_tunnel_lookup()
168 if (t->parms.link != link) in ip6gre_tunnel_lookup()
182 if ((!ipv6_addr_equal(local, &t->parms.laddr) && in ip6gre_tunnel_lookup()
183 (!ipv6_addr_equal(local, &t->parms.raddr) || in ip6gre_tunnel_lookup()
185 key != t->parms.i_key || in ip6gre_tunnel_lookup()
194 if (t->parms.link != link) in ip6gre_tunnel_lookup()
208 if (t->parms.i_key != key || in ip6gre_tunnel_lookup()
217 if (t->parms.link != link) in ip6gre_tunnel_lookup()
269 if (t->parms.collect_md) in ip6gre_tunnel_link_md()
275 if (t->parms.collect_md) in ip6erspan_tunnel_link_md()
281 if (t->parms.collect_md) in ip6gre_tunnel_unlink_md()
288 if (t->parms.collect_md) in ip6erspan_tunnel_unlink_md()
295 return __ip6gre_bucket(ign, &t->parms); in ip6gre_bucket()
322 const struct __ip6_tnl_parm *parms, in ip6gre_tunnel_find() argument
325 const struct in6_addr *remote = &parms->raddr; in ip6gre_tunnel_find()
326 const struct in6_addr *local = &parms->laddr; in ip6gre_tunnel_find()
327 __be32 key = parms->i_key; in ip6gre_tunnel_find()
328 int link = parms->link; in ip6gre_tunnel_find()
333 for (tp = __ip6gre_bucket(ign, parms); in ip6gre_tunnel_find()
336 if (ipv6_addr_equal(local, &t->parms.laddr) && in ip6gre_tunnel_find()
337 ipv6_addr_equal(remote, &t->parms.raddr) && in ip6gre_tunnel_find()
338 key == t->parms.i_key && in ip6gre_tunnel_find()
339 link == t->parms.link && in ip6gre_tunnel_find()
347 const struct __ip6_tnl_parm *parms, int create) in ip6gre_tunnel_locate() argument
354 t = ip6gre_tunnel_find(net, parms, ARPHRD_IP6GRE); in ip6gre_tunnel_locate()
360 if (parms->name[0]) { in ip6gre_tunnel_locate()
361 if (!dev_valid_name(parms->name)) in ip6gre_tunnel_locate()
363 strscpy(name, parms->name, IFNAMSIZ); in ip6gre_tunnel_locate()
375 nt->parms = *parms; in ip6gre_tunnel_locate()
439 t->parms.name); in ip6gre_err()
446 t->parms.name); in ip6gre_err()
462 t->parms.name); in ip6gre_err()
466 t->parms.name); in ip6gre_err()
498 if (tunnel->parms.collect_md) { in ip6gre_rcv()
549 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
639 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in prepare_ip6gre_xmit_ipv4()
640 *encap_limit = t->parms.encap_limit; in prepare_ip6gre_xmit_ipv4()
644 if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) in prepare_ip6gre_xmit_ipv4()
647 *dsfield = ip6_tclass(t->parms.flowinfo); in prepare_ip6gre_xmit_ipv4()
649 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) in prepare_ip6gre_xmit_ipv4()
652 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv4()
680 } else if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) { in prepare_ip6gre_xmit_ipv6()
681 *encap_limit = t->parms.encap_limit; in prepare_ip6gre_xmit_ipv6()
686 if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) in prepare_ip6gre_xmit_ipv6()
689 *dsfield = ip6_tclass(t->parms.flowinfo); in prepare_ip6gre_xmit_ipv6()
691 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) in prepare_ip6gre_xmit_ipv6()
694 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) in prepare_ip6gre_xmit_ipv6()
697 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv6()
711 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in prepare_ip6gre_xmit_other()
712 *encap_limit = t->parms.encap_limit; in prepare_ip6gre_xmit_other()
716 if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) in prepare_ip6gre_xmit_other()
719 *dsfield = ip6_tclass(t->parms.flowinfo); in prepare_ip6gre_xmit_other()
721 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) in prepare_ip6gre_xmit_other()
724 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_other()
757 fl6->daddr = tunnel->parms.raddr; in __gre6_xmit()
762 if (tunnel->parms.collect_md) { in __gre6_xmit()
798 flags = tunnel->parms.o_flags; in __gre6_xmit()
801 protocol, tunnel->parms.o_key, in __gre6_xmit()
821 if (!t->parms.collect_md) in ip6gre_xmit_ipv4()
825 err = gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM)); in ip6gre_xmit_ipv4()
852 if (ipv6_addr_equal(&t->parms.raddr, &ipv6h->saddr)) in ip6gre_xmit_ipv6()
855 if (!t->parms.collect_md && in ip6gre_xmit_ipv6()
859 if (gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM))) in ip6gre_xmit_ipv6()
882 if (!t->parms.collect_md && in ip6gre_xmit_other()
886 err = gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM)); in ip6gre_xmit_other()
904 if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr)) in ip6gre_tunnel_xmit()
926 if (!t->parms.collect_md || !IS_ERR(skb_tunnel_info_txcheck(skb))) in ip6gre_tunnel_xmit()
951 if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr)) in ip6erspan_tunnel_xmit()
982 t->parms.o_flags &= ~TUNNEL_KEY; in ip6erspan_tunnel_xmit()
988 if (t->parms.collect_md) { in ip6erspan_tunnel_xmit()
1038 if (ipv6_addr_equal(&t->parms.raddr, &ipv6_hdr(skb)->saddr)) in ip6erspan_tunnel_xmit()
1049 if (t->parms.erspan_ver == 1) { in ip6erspan_tunnel_xmit()
1050 erspan_build_header(skb, ntohl(t->parms.o_key), in ip6erspan_tunnel_xmit()
1051 t->parms.index, in ip6erspan_tunnel_xmit()
1054 } else if (t->parms.erspan_ver == 2) { in ip6erspan_tunnel_xmit()
1055 erspan_build_header_v2(skb, ntohl(t->parms.o_key), in ip6erspan_tunnel_xmit()
1056 t->parms.dir, in ip6erspan_tunnel_xmit()
1057 t->parms.hwid, in ip6erspan_tunnel_xmit()
1064 fl6.daddr = t->parms.raddr; in ip6erspan_tunnel_xmit()
1071 if (!t->parms.collect_md && dst && dst_mtu(dst) > dst->dev->mtu) in ip6erspan_tunnel_xmit()
1101 struct __ip6_tnl_parm *p = &t->parms; in ip6gre_tnl_link_config_common()
1115 fl6->fl6_gre_key = t->parms.o_key; in ip6gre_tnl_link_config_common()
1135 const struct __ip6_tnl_parm *p = &t->parms; in ip6gre_tnl_link_config_route()
1161 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6gre_tnl_link_config_route()
1179 tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags); in ip6gre_calc_hlen()
1201 t->parms.laddr = p->laddr; in ip6gre_tnl_copy_tnl_parm()
1202 t->parms.raddr = p->raddr; in ip6gre_tnl_copy_tnl_parm()
1203 t->parms.flags = p->flags; in ip6gre_tnl_copy_tnl_parm()
1204 t->parms.hop_limit = p->hop_limit; in ip6gre_tnl_copy_tnl_parm()
1205 t->parms.encap_limit = p->encap_limit; in ip6gre_tnl_copy_tnl_parm()
1206 t->parms.flowinfo = p->flowinfo; in ip6gre_tnl_copy_tnl_parm()
1207 t->parms.link = p->link; in ip6gre_tnl_copy_tnl_parm()
1208 t->parms.proto = p->proto; in ip6gre_tnl_copy_tnl_parm()
1209 t->parms.i_key = p->i_key; in ip6gre_tnl_copy_tnl_parm()
1210 t->parms.o_key = p->o_key; in ip6gre_tnl_copy_tnl_parm()
1211 t->parms.i_flags = p->i_flags; in ip6gre_tnl_copy_tnl_parm()
1212 t->parms.o_flags = p->o_flags; in ip6gre_tnl_copy_tnl_parm()
1213 t->parms.fwmark = p->fwmark; in ip6gre_tnl_copy_tnl_parm()
1214 t->parms.erspan_ver = p->erspan_ver; in ip6gre_tnl_copy_tnl_parm()
1215 t->parms.index = p->index; in ip6gre_tnl_copy_tnl_parm()
1216 t->parms.dir = p->dir; in ip6gre_tnl_copy_tnl_parm()
1217 t->parms.hwid = p->hwid; in ip6gre_tnl_copy_tnl_parm()
1290 ip6gre_tnl_parm_to_user(&p, &t->parms); in ip6gre_tunnel_siocdevprivate()
1338 ip6gre_tnl_parm_to_user(&p, &t->parms); in ip6gre_tunnel_siocdevprivate()
1388 ipv6h->hop_limit = t->parms.hop_limit; in ip6gre_header()
1390 ipv6h->saddr = t->parms.laddr; in ip6gre_header()
1391 ipv6h->daddr = t->parms.raddr; in ip6gre_header()
1394 p[0] = t->parms.o_flags; in ip6gre_header()
1463 flags = nt->parms.o_flags; in ip6gre_tnl_init_features()
1487 strcpy(tunnel->parms.name, dev->name); in ip6gre_tunnel_init_common()
1505 if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6gre_tunnel_init_common()
1508 if (tunnel->parms.collect_md) { in ip6gre_tunnel_init_common()
1535 if (tunnel->parms.collect_md) in ip6gre_tunnel_init()
1538 __dev_addr_set(dev, &tunnel->parms.laddr, sizeof(struct in6_addr)); in ip6gre_tunnel_init()
1539 memcpy(dev->broadcast, &tunnel->parms.raddr, sizeof(struct in6_addr)); in ip6gre_tunnel_init()
1541 if (ipv6_addr_any(&tunnel->parms.raddr)) in ip6gre_tunnel_init()
1553 strcpy(tunnel->parms.name, dev->name); in ip6gre_fb_tunnel_init()
1764 struct __ip6_tnl_parm *parms) in ip6erspan_set_version() argument
1769 parms->erspan_ver = 1; in ip6erspan_set_version()
1771 parms->erspan_ver = nla_get_u8(data[IFLA_GRE_ERSPAN_VER]); in ip6erspan_set_version()
1773 if (parms->erspan_ver == 1) { in ip6erspan_set_version()
1775 parms->index = nla_get_u32(data[IFLA_GRE_ERSPAN_INDEX]); in ip6erspan_set_version()
1776 } else if (parms->erspan_ver == 2) { in ip6erspan_set_version()
1778 parms->dir = nla_get_u8(data[IFLA_GRE_ERSPAN_DIR]); in ip6erspan_set_version()
1780 parms->hwid = nla_get_u16(data[IFLA_GRE_ERSPAN_HWID]); in ip6erspan_set_version()
1785 struct __ip6_tnl_parm *parms) in ip6gre_netlink_parms() argument
1787 memset(parms, 0, sizeof(*parms)); in ip6gre_netlink_parms()
1793 parms->link = nla_get_u32(data[IFLA_GRE_LINK]); in ip6gre_netlink_parms()
1796 parms->i_flags = gre_flags_to_tnl_flags( in ip6gre_netlink_parms()
1800 parms->o_flags = gre_flags_to_tnl_flags( in ip6gre_netlink_parms()
1804 parms->i_key = nla_get_be32(data[IFLA_GRE_IKEY]); in ip6gre_netlink_parms()
1807 parms->o_key = nla_get_be32(data[IFLA_GRE_OKEY]); in ip6gre_netlink_parms()
1810 parms->laddr = nla_get_in6_addr(data[IFLA_GRE_LOCAL]); in ip6gre_netlink_parms()
1813 parms->raddr = nla_get_in6_addr(data[IFLA_GRE_REMOTE]); in ip6gre_netlink_parms()
1816 parms->hop_limit = nla_get_u8(data[IFLA_GRE_TTL]); in ip6gre_netlink_parms()
1819 parms->encap_limit = nla_get_u8(data[IFLA_GRE_ENCAP_LIMIT]); in ip6gre_netlink_parms()
1822 parms->flowinfo = nla_get_be32(data[IFLA_GRE_FLOWINFO]); in ip6gre_netlink_parms()
1825 parms->flags = nla_get_u32(data[IFLA_GRE_FLAGS]); in ip6gre_netlink_parms()
1828 parms->fwmark = nla_get_u32(data[IFLA_GRE_FWMARK]); in ip6gre_netlink_parms()
1831 parms->collect_md = true; in ip6gre_netlink_parms()
1864 erspan_hdr_len(tunnel->parms.erspan_ver); in ip6erspan_calc_hlen()
1881 strcpy(tunnel->parms.name, dev->name); in ip6erspan_tap_init()
1899 if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6erspan_tap_init()
2018 ip6gre_netlink_parms(data, &nt->parms); in ip6gre_newlink()
2021 if (nt->parms.collect_md) { in ip6gre_newlink()
2025 if (ip6gre_tunnel_find(net, &nt->parms, dev->type)) in ip6gre_newlink()
2146 struct __ip6_tnl_parm *p = &t->parms; in ip6gre_fill_info()
2251 ip6gre_netlink_parms(data, &nt->parms); in ip6erspan_newlink()
2252 ip6erspan_set_version(data, &nt->parms); in ip6erspan_newlink()
2255 if (nt->parms.collect_md) { in ip6erspan_newlink()
2259 if (ip6gre_tunnel_find(net, &nt->parms, dev->type)) in ip6erspan_newlink()