Lines Matching refs:match
1653 struct packet_fanout *f, *match;
1705 match = NULL;
1709 match = f;
1714 if (match) {
1715 if (match->flags != flags)
1718 args->max_num_members != match->max_num_members)
1727 match = kvzalloc(struct_size(match, arr, args->max_num_members),
1729 if (!match)
1731 write_pnet(&match->net, sock_net(sk));
1732 match->id = id;
1733 match->type = type;
1734 match->flags = flags;
1735 INIT_LIST_HEAD(&match->list);
1736 spin_lock_init(&match->lock);
1737 refcount_set(&match->sk_ref, 0);
1738 fanout_init_data(match);
1739 match->prot_hook.type = po->prot_hook.type;
1740 match->prot_hook.dev = po->prot_hook.dev;
1741 match->prot_hook.func = packet_rcv_fanout;
1742 match->prot_hook.af_packet_priv = match;
1743 match->prot_hook.af_packet_net = read_pnet(&match->net);
1744 match->prot_hook.id_match = match_fanout_group;
1745 match->max_num_members = args->max_num_members;
1746 list_add(&match->list, &fanout_list);
1752 match->type == type &&
1753 match->prot_hook.type == po->prot_hook.type &&
1754 match->prot_hook.dev == po->prot_hook.dev) {
1756 if (refcount_read(&match->sk_ref) < match->max_num_members) {
1760 WRITE_ONCE(po->fanout, match);
1764 refcount_set(&match->sk_ref, refcount_read(&match->sk_ref) + 1);
1771 if (err && !refcount_read(&match->sk_ref)) {
1772 list_del(&match->list);
1773 kvfree(match);