Lines Matching refs:p
182 struct rb_node *p, *r; in service_range_match_next() local
197 while ((p = rb_parent(n)) && n == p->rb_right) in service_range_match_next()
198 n = p; in service_range_match_next()
199 if (!p) in service_range_match_next()
203 sr = service_range_entry(p); in service_range_match_next()
209 n = p; in service_range_match_next()
233 struct publication *p = kzalloc(sizeof(*p), GFP_ATOMIC); in tipc_publ_create() local
235 if (!p) in tipc_publ_create()
238 p->sr = ua->sr; in tipc_publ_create()
239 p->sk = *sk; in tipc_publ_create()
240 p->scope = ua->scope; in tipc_publ_create()
241 p->key = key; in tipc_publ_create()
242 INIT_LIST_HEAD(&p->binding_sock); in tipc_publ_create()
243 INIT_LIST_HEAD(&p->binding_node); in tipc_publ_create()
244 INIT_LIST_HEAD(&p->local_publ); in tipc_publ_create()
245 INIT_LIST_HEAD(&p->all_publ); in tipc_publ_create()
246 INIT_LIST_HEAD(&p->list); in tipc_publ_create()
247 return p; in tipc_publ_create()
297 struct publication *p) in tipc_service_create_range() argument
301 u32 lower = p->sr.lower; in tipc_service_create_range()
302 u32 upper = p->sr.upper; in tipc_service_create_range()
332 struct publication *p) in tipc_service_insert_publ() argument
337 u32 node = p->sk.node; in tipc_service_insert_publ()
340 u32 key = p->key; in tipc_service_insert_publ()
343 sr = tipc_service_create_range(sc, p); in tipc_service_insert_publ()
353 p->sr.type, p->sr.lower, p->sr.upper, in tipc_service_insert_publ()
354 node, p->sk.ref, key); in tipc_service_insert_publ()
359 if (in_own_node(net, p->sk.node)) in tipc_service_insert_publ()
360 list_add(&p->local_publ, &sr->local_publ); in tipc_service_insert_publ()
361 list_add(&p->all_publ, &sr->all_publ); in tipc_service_insert_publ()
362 p->id = sc->publ_cnt++; in tipc_service_insert_publ()
366 tipc_sub_report_overlap(sub, p, TIPC_PUBLISHED, first); in tipc_service_insert_publ()
372 p->sr.type, p->sr.lower, p->sr.upper); in tipc_service_insert_publ()
387 struct publication *p; in tipc_service_remove_publ() local
390 list_for_each_entry(p, &r->all_publ, all_publ) { in tipc_service_remove_publ()
391 if (p->key != key || (node && node != p->sk.node)) in tipc_service_remove_publ()
393 list_del(&p->all_publ); in tipc_service_remove_publ()
394 list_del(&p->local_publ); in tipc_service_remove_publ()
395 return p; in tipc_service_remove_publ()
424 struct publication *p, *first, *tmp; in tipc_service_subscribe() local
442 list_for_each_entry(p, &sr->all_publ, all_publ) { in tipc_service_subscribe()
444 list_add_tail(&p->list, &publ_list); in tipc_service_subscribe()
445 else if (!first || publication_after(first, p)) in tipc_service_subscribe()
447 first = p; in tipc_service_subscribe()
455 list_for_each_entry_safe(p, tmp, &publ_list, list) { in tipc_service_subscribe()
456 tipc_sub_report_overlap(sub, p, TIPC_PUBLISHED, true); in tipc_service_subscribe()
457 list_del_init(&p->list); in tipc_service_subscribe()
482 struct publication *p; in tipc_nametbl_insert_publ() local
484 p = tipc_publ_create(ua, sk, key); in tipc_nametbl_insert_publ()
485 if (!p) in tipc_nametbl_insert_publ()
491 if (sc && tipc_service_insert_publ(net, sc, p)) in tipc_nametbl_insert_publ()
492 return p; in tipc_nametbl_insert_publ()
493 kfree(p); in tipc_nametbl_insert_publ()
503 struct publication *p = NULL; in tipc_nametbl_remove_publ() local
516 p = tipc_service_remove_publ(sr, sk, key); in tipc_nametbl_remove_publ()
517 if (!p) in tipc_nametbl_remove_publ()
523 tipc_sub_report_overlap(sub, p, TIPC_WITHDRAWN, last); in tipc_nametbl_remove_publ()
540 if (!p) { in tipc_nametbl_remove_publ()
545 return p; in tipc_nametbl_remove_publ()
579 struct publication *p; in tipc_nametbl_lookup_anycast() local
598 p = list_first_entry(l, struct publication, local_publ); in tipc_nametbl_lookup_anycast()
599 list_move_tail(&p->local_publ, &r->local_publ); in tipc_nametbl_lookup_anycast()
602 p = list_first_entry(l, struct publication, local_publ); in tipc_nametbl_lookup_anycast()
603 list_move_tail(&p->local_publ, &r->local_publ); in tipc_nametbl_lookup_anycast()
606 p = list_first_entry(l, struct publication, all_publ); in tipc_nametbl_lookup_anycast()
607 list_move_tail(&p->all_publ, &r->all_publ); in tipc_nametbl_lookup_anycast()
609 *sk = p->sk; in tipc_nametbl_lookup_anycast()
636 struct publication *p; in tipc_nametbl_lookup_group() local
651 list_for_each_entry(p, &sr->all_publ, all_publ) { in tipc_nametbl_lookup_group()
652 if (p->scope != ua->scope) in tipc_nametbl_lookup_group()
654 if (p->sk.ref == exclude && p->sk.node == self) in tipc_nametbl_lookup_group()
656 tipc_dest_push(dsts, p->sk.node, p->sk.ref); in tipc_nametbl_lookup_group()
660 list_move_tail(&p->all_publ, &sr->all_publ); in tipc_nametbl_lookup_group()
680 struct publication *p; in tipc_nametbl_lookup_mcast_sockets() local
690 list_for_each_entry(p, &sr->local_publ, local_publ) { in tipc_nametbl_lookup_mcast_sockets()
691 if (scope == p->scope || scope == TIPC_ANY_SCOPE) in tipc_nametbl_lookup_mcast_sockets()
692 tipc_dest_push(dports, 0, p->sk.ref); in tipc_nametbl_lookup_mcast_sockets()
710 struct publication *p; in tipc_nametbl_lookup_mcast_nodes() local
719 list_for_each_entry(p, &sr->all_publ, all_publ) { in tipc_nametbl_lookup_mcast_nodes()
720 tipc_nlist_add(nodes, p->sk.node); in tipc_nametbl_lookup_mcast_nodes()
735 struct publication *p; in tipc_nametbl_build_group() local
746 list_for_each_entry(p, &sr->all_publ, all_publ) { in tipc_nametbl_build_group()
747 if (p->scope != ua->scope) in tipc_nametbl_build_group()
749 tipc_group_add_member(grp, p->sk.node, p->sk.ref, in tipc_nametbl_build_group()
750 p->sr.lower); in tipc_nametbl_build_group()
765 struct publication *p = NULL; in tipc_nametbl_publish() local
776 p = tipc_nametbl_insert_publ(net, ua, sk, key); in tipc_nametbl_publish()
777 if (p) { in tipc_nametbl_publish()
779 skb = tipc_named_publish(net, p); in tipc_nametbl_publish()
787 return p; in tipc_nametbl_publish()
804 struct publication *p; in tipc_nametbl_withdraw() local
809 p = tipc_nametbl_remove_publ(net, ua, sk, key); in tipc_nametbl_withdraw()
810 if (p) { in tipc_nametbl_withdraw()
812 skb = tipc_named_withdraw(net, p); in tipc_nametbl_withdraw()
813 list_del_init(&p->binding_sock); in tipc_nametbl_withdraw()
814 kfree_rcu(p, rcu); in tipc_nametbl_withdraw()
914 struct publication *p, *tmp; in tipc_service_delete() local
918 list_for_each_entry_safe(p, tmp, &sr->all_publ, all_publ) { in tipc_service_delete()
919 tipc_service_remove_publ(sr, &p->sk, p->key); in tipc_service_delete()
920 kfree_rcu(p, rcu); in tipc_service_delete()
961 struct publication *p; in __tipc_nl_add_nametable_publ() local
967 list_for_each_entry(p, &sr->all_publ, all_publ) in __tipc_nl_add_nametable_publ()
968 if (p->key == *last_key) in __tipc_nl_add_nametable_publ()
970 if (list_entry_is_head(p, &sr->all_publ, all_publ)) in __tipc_nl_add_nametable_publ()
973 p = list_first_entry(&sr->all_publ, in __tipc_nl_add_nametable_publ()
978 list_for_each_entry_from(p, &sr->all_publ, all_publ) { in __tipc_nl_add_nametable_publ()
979 *last_key = p->key; in __tipc_nl_add_nametable_publ()
1001 if (nla_put_u32(msg->skb, TIPC_NLA_PUBL_SCOPE, p->scope)) in __tipc_nl_add_nametable_publ()
1003 if (nla_put_u32(msg->skb, TIPC_NLA_PUBL_NODE, p->sk.node)) in __tipc_nl_add_nametable_publ()
1005 if (nla_put_u32(msg->skb, TIPC_NLA_PUBL_REF, p->sk.ref)) in __tipc_nl_add_nametable_publ()
1007 if (nla_put_u32(msg->skb, TIPC_NLA_PUBL_KEY, p->key)) in __tipc_nl_add_nametable_publ()