Lines Matching refs:match
1735 struct packet_fanout *f, *match; in fanout_add() local
1788 match = NULL; in fanout_add()
1792 match = f; in fanout_add()
1797 if (match) { in fanout_add()
1798 if (match->flags != flags) in fanout_add()
1801 args->max_num_members != match->max_num_members) in fanout_add()
1810 match = kvzalloc(struct_size(match, arr, args->max_num_members), in fanout_add()
1812 if (!match) in fanout_add()
1814 write_pnet(&match->net, sock_net(sk)); in fanout_add()
1815 match->id = id; in fanout_add()
1816 match->type = type; in fanout_add()
1817 match->flags = flags; in fanout_add()
1818 INIT_LIST_HEAD(&match->list); in fanout_add()
1819 spin_lock_init(&match->lock); in fanout_add()
1820 refcount_set(&match->sk_ref, 0); in fanout_add()
1821 fanout_init_data(match); in fanout_add()
1822 match->prot_hook.type = po->prot_hook.type; in fanout_add()
1823 match->prot_hook.dev = po->prot_hook.dev; in fanout_add()
1824 match->prot_hook.func = packet_rcv_fanout; in fanout_add()
1825 match->prot_hook.af_packet_priv = match; in fanout_add()
1826 match->prot_hook.af_packet_net = read_pnet(&match->net); in fanout_add()
1827 match->prot_hook.id_match = match_fanout_group; in fanout_add()
1828 match->max_num_members = args->max_num_members; in fanout_add()
1829 match->prot_hook.ignore_outgoing = type_flags & PACKET_FANOUT_FLAG_IGNORE_OUTGOING; in fanout_add()
1830 list_add(&match->list, &fanout_list); in fanout_add()
1836 match->type == type && in fanout_add()
1837 match->prot_hook.type == po->prot_hook.type && in fanout_add()
1838 match->prot_hook.dev == po->prot_hook.dev) { in fanout_add()
1840 if (refcount_read(&match->sk_ref) < match->max_num_members) { in fanout_add()
1842 WRITE_ONCE(po->fanout, match); in fanout_add()
1846 refcount_set(&match->sk_ref, refcount_read(&match->sk_ref) + 1); in fanout_add()
1856 if (err && !refcount_read(&match->sk_ref)) { in fanout_add()
1857 list_del(&match->list); in fanout_add()
1858 kvfree(match); in fanout_add()