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 strlcpy(name, parms->name, IFNAMSIZ); in ip6gre_tunnel_locate()
375 nt->parms = *parms; in ip6gre_tunnel_locate()
387 if (!(nt->parms.o_flags & TUNNEL_SEQ)) in ip6gre_tunnel_locate()
444 t->parms.name); in ip6gre_err()
451 t->parms.name); in ip6gre_err()
467 t->parms.name); in ip6gre_err()
471 t->parms.name); in ip6gre_err()
503 if (tunnel->parms.collect_md) { in ip6gre_rcv()
554 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
644 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in prepare_ip6gre_xmit_ipv4()
645 *encap_limit = t->parms.encap_limit; in prepare_ip6gre_xmit_ipv4()
649 if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) in prepare_ip6gre_xmit_ipv4()
652 *dsfield = ip6_tclass(t->parms.flowinfo); in prepare_ip6gre_xmit_ipv4()
654 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) in prepare_ip6gre_xmit_ipv4()
657 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv4()
685 } else if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) { in prepare_ip6gre_xmit_ipv6()
686 *encap_limit = t->parms.encap_limit; in prepare_ip6gre_xmit_ipv6()
691 if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) in prepare_ip6gre_xmit_ipv6()
694 *dsfield = ip6_tclass(t->parms.flowinfo); in prepare_ip6gre_xmit_ipv6()
696 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) in prepare_ip6gre_xmit_ipv6()
699 if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) in prepare_ip6gre_xmit_ipv6()
702 fl6->flowi6_mark = t->parms.fwmark; in prepare_ip6gre_xmit_ipv6()
734 fl6->daddr = tunnel->parms.raddr; in __gre6_xmit()
742 if (tunnel->parms.collect_md) { in __gre6_xmit()
771 if (tunnel->parms.o_flags & TUNNEL_SEQ) in __gre6_xmit()
774 gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags, in __gre6_xmit()
775 protocol, tunnel->parms.o_key, in __gre6_xmit()
794 if (!t->parms.collect_md) in ip6gre_xmit_ipv4()
798 err = gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM)); in ip6gre_xmit_ipv4()
825 if (ipv6_addr_equal(&t->parms.raddr, &ipv6h->saddr)) in ip6gre_xmit_ipv6()
828 if (!t->parms.collect_md && in ip6gre_xmit_ipv6()
832 if (gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM))) in ip6gre_xmit_ipv6()
863 return ipv6_addr_equal(&t->parms.raddr, &hdr->saddr); in ip6gre_tnl_addr_conflict()
874 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6gre_xmit_other()
875 encap_limit = t->parms.encap_limit; in ip6gre_xmit_other()
877 if (!t->parms.collect_md) in ip6gre_xmit_other()
880 err = gre_handle_offloads(skb, !!(t->parms.o_flags & TUNNEL_CSUM)); in ip6gre_xmit_other()
899 if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr)) in ip6gre_tunnel_xmit()
920 if (!t->parms.collect_md || !IS_ERR(skb_tunnel_info_txcheck(skb))) in ip6gre_tunnel_xmit()
947 if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr)) in ip6erspan_tunnel_xmit()
971 t->parms.o_flags &= ~TUNNEL_KEY; in ip6erspan_tunnel_xmit()
977 if (t->parms.collect_md) { in ip6erspan_tunnel_xmit()
1024 if (ipv6_addr_equal(&t->parms.raddr, &ipv6_hdr(skb)->saddr)) in ip6erspan_tunnel_xmit()
1035 if (t->parms.erspan_ver == 1) in ip6erspan_tunnel_xmit()
1036 erspan_build_header(skb, ntohl(t->parms.o_key), in ip6erspan_tunnel_xmit()
1037 t->parms.index, in ip6erspan_tunnel_xmit()
1039 else if (t->parms.erspan_ver == 2) in ip6erspan_tunnel_xmit()
1040 erspan_build_header_v2(skb, ntohl(t->parms.o_key), in ip6erspan_tunnel_xmit()
1041 t->parms.dir, in ip6erspan_tunnel_xmit()
1042 t->parms.hwid, in ip6erspan_tunnel_xmit()
1047 fl6.daddr = t->parms.raddr; in ip6erspan_tunnel_xmit()
1051 proto = (t->parms.erspan_ver == 1) ? htons(ETH_P_ERSPAN) in ip6erspan_tunnel_xmit()
1056 if (!t->parms.collect_md && dst && dst_mtu(dst) > dst->dev->mtu) in ip6erspan_tunnel_xmit()
1087 struct __ip6_tnl_parm *p = &t->parms; in ip6gre_tnl_link_config_common()
1120 const struct __ip6_tnl_parm *p = &t->parms; in ip6gre_tnl_link_config_route()
1145 if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6gre_tnl_link_config_route()
1162 tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags); in ip6gre_calc_hlen()
1184 t->parms.laddr = p->laddr; in ip6gre_tnl_copy_tnl_parm()
1185 t->parms.raddr = p->raddr; in ip6gre_tnl_copy_tnl_parm()
1186 t->parms.flags = p->flags; in ip6gre_tnl_copy_tnl_parm()
1187 t->parms.hop_limit = p->hop_limit; in ip6gre_tnl_copy_tnl_parm()
1188 t->parms.encap_limit = p->encap_limit; in ip6gre_tnl_copy_tnl_parm()
1189 t->parms.flowinfo = p->flowinfo; in ip6gre_tnl_copy_tnl_parm()
1190 t->parms.link = p->link; in ip6gre_tnl_copy_tnl_parm()
1191 t->parms.proto = p->proto; in ip6gre_tnl_copy_tnl_parm()
1192 t->parms.i_key = p->i_key; in ip6gre_tnl_copy_tnl_parm()
1193 t->parms.o_key = p->o_key; in ip6gre_tnl_copy_tnl_parm()
1194 t->parms.i_flags = p->i_flags; in ip6gre_tnl_copy_tnl_parm()
1195 t->parms.o_flags = p->o_flags; in ip6gre_tnl_copy_tnl_parm()
1196 t->parms.fwmark = p->fwmark; in ip6gre_tnl_copy_tnl_parm()
1197 t->parms.erspan_ver = p->erspan_ver; in ip6gre_tnl_copy_tnl_parm()
1198 t->parms.index = p->index; in ip6gre_tnl_copy_tnl_parm()
1199 t->parms.dir = p->dir; in ip6gre_tnl_copy_tnl_parm()
1200 t->parms.hwid = p->hwid; in ip6gre_tnl_copy_tnl_parm()
1273 ip6gre_tnl_parm_to_user(&p, &t->parms); in ip6gre_tunnel_siocdevprivate()
1321 ip6gre_tnl_parm_to_user(&p, &t->parms); in ip6gre_tunnel_siocdevprivate()
1371 ipv6h->hop_limit = t->parms.hop_limit; in ip6gre_header()
1373 ipv6h->saddr = t->parms.laddr; in ip6gre_header()
1374 ipv6h->daddr = t->parms.raddr; in ip6gre_header()
1377 p[0] = t->parms.o_flags; in ip6gre_header()
1445 if (!(nt->parms.o_flags & TUNNEL_SEQ)) { in ip6gre_tnl_init_features()
1450 if (!(nt->parms.o_flags & TUNNEL_CSUM) || in ip6gre_tnl_init_features()
1473 strcpy(tunnel->parms.name, dev->name); in ip6gre_tunnel_init_common()
1491 if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6gre_tunnel_init_common()
1494 if (tunnel->parms.collect_md) { in ip6gre_tunnel_init_common()
1521 if (tunnel->parms.collect_md) in ip6gre_tunnel_init()
1524 __dev_addr_set(dev, &tunnel->parms.laddr, sizeof(struct in6_addr)); in ip6gre_tunnel_init()
1525 memcpy(dev->broadcast, &tunnel->parms.raddr, sizeof(struct in6_addr)); in ip6gre_tunnel_init()
1527 if (ipv6_addr_any(&tunnel->parms.raddr)) in ip6gre_tunnel_init()
1539 strcpy(tunnel->parms.name, dev->name); in ip6gre_fb_tunnel_init()
1750 struct __ip6_tnl_parm *parms) in ip6erspan_set_version() argument
1755 parms->erspan_ver = 1; in ip6erspan_set_version()
1757 parms->erspan_ver = nla_get_u8(data[IFLA_GRE_ERSPAN_VER]); in ip6erspan_set_version()
1759 if (parms->erspan_ver == 1) { in ip6erspan_set_version()
1761 parms->index = nla_get_u32(data[IFLA_GRE_ERSPAN_INDEX]); in ip6erspan_set_version()
1762 } else if (parms->erspan_ver == 2) { in ip6erspan_set_version()
1764 parms->dir = nla_get_u8(data[IFLA_GRE_ERSPAN_DIR]); in ip6erspan_set_version()
1766 parms->hwid = nla_get_u16(data[IFLA_GRE_ERSPAN_HWID]); in ip6erspan_set_version()
1771 struct __ip6_tnl_parm *parms) in ip6gre_netlink_parms() argument
1773 memset(parms, 0, sizeof(*parms)); in ip6gre_netlink_parms()
1779 parms->link = nla_get_u32(data[IFLA_GRE_LINK]); in ip6gre_netlink_parms()
1782 parms->i_flags = gre_flags_to_tnl_flags( in ip6gre_netlink_parms()
1786 parms->o_flags = gre_flags_to_tnl_flags( in ip6gre_netlink_parms()
1790 parms->i_key = nla_get_be32(data[IFLA_GRE_IKEY]); in ip6gre_netlink_parms()
1793 parms->o_key = nla_get_be32(data[IFLA_GRE_OKEY]); in ip6gre_netlink_parms()
1796 parms->laddr = nla_get_in6_addr(data[IFLA_GRE_LOCAL]); in ip6gre_netlink_parms()
1799 parms->raddr = nla_get_in6_addr(data[IFLA_GRE_REMOTE]); in ip6gre_netlink_parms()
1802 parms->hop_limit = nla_get_u8(data[IFLA_GRE_TTL]); in ip6gre_netlink_parms()
1805 parms->encap_limit = nla_get_u8(data[IFLA_GRE_ENCAP_LIMIT]); in ip6gre_netlink_parms()
1808 parms->flowinfo = nla_get_be32(data[IFLA_GRE_FLOWINFO]); in ip6gre_netlink_parms()
1811 parms->flags = nla_get_u32(data[IFLA_GRE_FLAGS]); in ip6gre_netlink_parms()
1814 parms->fwmark = nla_get_u32(data[IFLA_GRE_FWMARK]); in ip6gre_netlink_parms()
1817 parms->collect_md = true; in ip6gre_netlink_parms()
1850 erspan_hdr_len(tunnel->parms.erspan_ver); in ip6erspan_calc_hlen()
1867 strcpy(tunnel->parms.name, dev->name); in ip6erspan_tap_init()
1885 if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) in ip6erspan_tap_init()
2004 ip6gre_netlink_parms(data, &nt->parms); in ip6gre_newlink()
2007 if (nt->parms.collect_md) { in ip6gre_newlink()
2011 if (ip6gre_tunnel_find(net, &nt->parms, dev->type)) in ip6gre_newlink()
2132 struct __ip6_tnl_parm *p = &t->parms; in ip6gre_fill_info()
2237 ip6gre_netlink_parms(data, &nt->parms); in ip6erspan_newlink()
2238 ip6erspan_set_version(data, &nt->parms); in ip6erspan_newlink()
2241 if (nt->parms.collect_md) { in ip6erspan_newlink()
2245 if (ip6gre_tunnel_find(net, &nt->parms, dev->type)) in ip6erspan_newlink()