Lines Matching refs:r
466 struct receiver *r; in can_rx_register() local
480 r = kmem_cache_alloc(rcv_cache, GFP_KERNEL); in can_rx_register()
481 if (!r) in can_rx_register()
490 r->can_id = can_id; in can_rx_register()
491 r->mask = mask; in can_rx_register()
492 r->matches = 0; in can_rx_register()
493 r->func = func; in can_rx_register()
494 r->data = data; in can_rx_register()
495 r->ident = ident; in can_rx_register()
496 r->sk = sk; in can_rx_register()
498 hlist_add_head_rcu(&r->list, rl); in can_rx_register()
505 kmem_cache_free(rcv_cache, r); in can_rx_register()
520 struct receiver *r = container_of(rp, struct receiver, rcu); in can_rx_delete_receiver() local
521 struct sock *sk = r->sk; in can_rx_delete_receiver()
523 kmem_cache_free(rcv_cache, r); in can_rx_delete_receiver()
543 struct receiver *r = NULL; in can_rx_unregister() local
572 hlist_for_each_entry_rcu(r, rl, list) { in can_rx_unregister()
573 if (r->can_id == can_id && r->mask == mask && in can_rx_unregister()
574 r->func == func && r->data == data) in can_rx_unregister()
583 if (!r) { in can_rx_unregister()
589 hlist_del_rcu(&r->list); in can_rx_unregister()
605 if (r) { in can_rx_unregister()
606 if (r->sk) in can_rx_unregister()
607 sock_hold(r->sk); in can_rx_unregister()
608 call_rcu(&r->rcu, can_rx_delete_receiver); in can_rx_unregister()
613 static inline void deliver(struct sk_buff *skb, struct receiver *r) in deliver() argument
615 r->func(skb, r->data); in deliver()
616 r->matches++; in deliver()
621 struct receiver *r; in can_rcv_filter() local
631 hlist_for_each_entry_rcu(r, &d->rx[RX_ERR], list) { in can_rcv_filter()
632 if (can_id & r->mask) { in can_rcv_filter()
633 deliver(skb, r); in can_rcv_filter()
641 hlist_for_each_entry_rcu(r, &d->rx[RX_ALL], list) { in can_rcv_filter()
642 deliver(skb, r); in can_rcv_filter()
647 hlist_for_each_entry_rcu(r, &d->rx[RX_FIL], list) { in can_rcv_filter()
648 if ((can_id & r->mask) == r->can_id) { in can_rcv_filter()
649 deliver(skb, r); in can_rcv_filter()
655 hlist_for_each_entry_rcu(r, &d->rx[RX_INV], list) { in can_rcv_filter()
656 if ((can_id & r->mask) != r->can_id) { in can_rcv_filter()
657 deliver(skb, r); in can_rcv_filter()
667 hlist_for_each_entry_rcu(r, &d->rx_eff[effhash(can_id)], list) { in can_rcv_filter()
668 if (r->can_id == can_id) { in can_rcv_filter()
669 deliver(skb, r); in can_rcv_filter()
675 hlist_for_each_entry_rcu(r, &d->rx_sff[can_id], list) { in can_rcv_filter()
676 deliver(skb, r); in can_rcv_filter()