Lines Matching refs:p
114 static bool __ip6addrlbl_match(const struct ip6addrlbl_entry *p, in __ip6addrlbl_match() argument
118 if (p->ifindex && p->ifindex != ifindex) in __ip6addrlbl_match()
120 if (p->addrtype && p->addrtype != addrtype) in __ip6addrlbl_match()
122 if (!ipv6_prefix_equal(addr, &p->prefix, p->prefixlen)) in __ip6addrlbl_match()
131 struct ip6addrlbl_entry *p; in __ipv6_addr_label() local
133 hlist_for_each_entry_rcu(p, &net->ipv6.ip6addrlbl_table.head, list) { in __ipv6_addr_label()
134 if (__ip6addrlbl_match(p, addr, type, ifindex)) in __ipv6_addr_label()
135 return p; in __ipv6_addr_label()
144 struct ip6addrlbl_entry *p; in ipv6_addr_label() local
149 p = __ipv6_addr_label(net, addr, type, ifindex); in ipv6_addr_label()
150 label = p ? p->label : IPV6_ADDR_LABEL_DEFAULT; in ipv6_addr_label()
206 struct ip6addrlbl_entry *last = NULL, *p = NULL; in __ip6addrlbl_add() local
213 hlist_for_each_entry_safe(p, n, &net->ipv6.ip6addrlbl_table.head, list) { in __ip6addrlbl_add()
214 if (p->prefixlen == newp->prefixlen && in __ip6addrlbl_add()
215 p->ifindex == newp->ifindex && in __ip6addrlbl_add()
216 ipv6_addr_equal(&p->prefix, &newp->prefix)) { in __ip6addrlbl_add()
221 hlist_replace_rcu(&p->list, &newp->list); in __ip6addrlbl_add()
222 kfree_rcu(p, rcu); in __ip6addrlbl_add()
224 } else if ((p->prefixlen == newp->prefixlen && !p->ifindex) || in __ip6addrlbl_add()
225 (p->prefixlen < newp->prefixlen)) { in __ip6addrlbl_add()
226 hlist_add_before_rcu(&newp->list, &p->list); in __ip6addrlbl_add()
229 last = p; in __ip6addrlbl_add()
269 struct ip6addrlbl_entry *p = NULL; in __ip6addrlbl_del() local
276 hlist_for_each_entry_safe(p, n, &net->ipv6.ip6addrlbl_table.head, list) { in __ip6addrlbl_del()
277 if (p->prefixlen == prefixlen && in __ip6addrlbl_del()
278 p->ifindex == ifindex && in __ip6addrlbl_del()
279 ipv6_addr_equal(&p->prefix, prefix)) { in __ip6addrlbl_del()
280 hlist_del_rcu(&p->list); in __ip6addrlbl_del()
281 kfree_rcu(p, rcu); in __ip6addrlbl_del()
309 struct ip6addrlbl_entry *p = NULL; in ip6addrlbl_net_init() local
331 hlist_for_each_entry_safe(p, n, &net->ipv6.ip6addrlbl_table.head, list) { in ip6addrlbl_net_init()
332 hlist_del_rcu(&p->list); in ip6addrlbl_net_init()
333 kfree_rcu(p, rcu); in ip6addrlbl_net_init()
340 struct ip6addrlbl_entry *p = NULL; in ip6addrlbl_net_exit() local
345 hlist_for_each_entry_safe(p, n, &net->ipv6.ip6addrlbl_table.head, list) { in ip6addrlbl_net_exit()
346 hlist_del_rcu(&p->list); in ip6addrlbl_net_exit()
347 kfree_rcu(p, rcu); in ip6addrlbl_net_exit()
448 struct ip6addrlbl_entry *p, in ip6addrlbl_fill() argument
458 ip6addrlbl_putmsg(nlh, p->prefixlen, p->ifindex, lseq); in ip6addrlbl_fill()
460 if (nla_put_in6_addr(skb, IFAL_ADDRESS, &p->prefix) < 0 || in ip6addrlbl_fill()
461 nla_put_u32(skb, IFAL_LABEL, p->label) < 0) { in ip6addrlbl_fill()
499 struct ip6addrlbl_entry *p; in ip6addrlbl_dump() local
510 hlist_for_each_entry_rcu(p, &net->ipv6.ip6addrlbl_table.head, list) { in ip6addrlbl_dump()
512 err = ip6addrlbl_fill(skb, p, in ip6addrlbl_dump()
588 struct ip6addrlbl_entry *p; in ip6addrlbl_get() local
616 p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index); in ip6addrlbl_get()
618 if (p) in ip6addrlbl_get()
619 err = ip6addrlbl_fill(skb, p, lseq, in ip6addrlbl_get()