Lines Matching refs:hslot
149 const struct udp_hslot *hslot, in udp_lib_lport_inuse() argument
156 sk_for_each(sk2, &hslot->head) { in udp_lib_lport_inuse()
215 static int udp_reuseport_add_sock(struct sock *sk, struct udp_hslot *hslot) in udp_reuseport_add_sock() argument
221 sk_for_each(sk2, &hslot->head) { in udp_reuseport_add_sock()
248 struct udp_hslot *hslot, *hslot2; in udp_lib_get_port() local
270 hslot = udp_hashslot(udptable, net, first); in udp_lib_get_port()
272 spin_lock_bh(&hslot->lock); in udp_lib_get_port()
273 udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, in udp_lib_get_port()
289 spin_unlock_bh(&hslot->lock); in udp_lib_get_port()
294 hslot = udp_hashslot(udptable, net, snum); in udp_lib_get_port()
295 spin_lock_bh(&hslot->lock); in udp_lib_get_port()
296 if (hslot->count > 10) { in udp_lib_get_port()
304 if (hslot->count < hslot2->count) in udp_lib_get_port()
319 if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, 0)) in udp_lib_get_port()
328 udp_reuseport_add_sock(sk, hslot)) { in udp_lib_get_port()
335 sk_add_node_rcu(sk, &hslot->head); in udp_lib_get_port()
336 hslot->count++; in udp_lib_get_port()
354 spin_unlock_bh(&hslot->lock); in udp_lib_get_port()
489 struct udp_hslot *hslot2, *hslot = &udptable->hash[slot]; in __udp4_lib_lookup() local
494 if (hslot->count > 10) { in __udp4_lib_lookup()
498 if (hslot->count < hslot2->count) in __udp4_lib_lookup()
513 if (hslot->count < hslot2->count) in __udp4_lib_lookup()
525 sk_for_each_rcu(sk, &hslot->head) { in __udp4_lib_lookup()
1730 struct udp_hslot *hslot, *hslot2; in udp_lib_unhash() local
1732 hslot = udp_hashslot(udptable, sock_net(sk), in udp_lib_unhash()
1736 spin_lock_bh(&hslot->lock); in udp_lib_unhash()
1740 hslot->count--; in udp_lib_unhash()
1749 spin_unlock_bh(&hslot->lock); in udp_lib_unhash()
1761 struct udp_hslot *hslot, *hslot2, *nhslot2; in udp_lib_rehash() local
1769 hslot = udp_hashslot(udptable, sock_net(sk), in udp_lib_rehash()
1772 spin_lock_bh(&hslot->lock); in udp_lib_rehash()
1789 spin_unlock_bh(&hslot->lock); in udp_lib_rehash()
1979 struct udp_hslot *hslot = udp_hashslot(udptable, net, hnum); in __udp4_lib_mcast_deliver() local
1980 unsigned int hash2 = 0, hash2_any = 0, use_hash2 = (hslot->count > 10); in __udp4_lib_mcast_deliver()
1992 hslot = &udptable->hash2[hash2]; in __udp4_lib_mcast_deliver()
1996 sk_for_each_entry_offset_rcu(sk, node, &hslot->head, offset) { in __udp4_lib_mcast_deliver()
2217 struct udp_hslot *hslot = &udp_table.hash[slot]; in __udp4_lib_mcast_demux_lookup() local
2220 if (hslot->count > 10) in __udp4_lib_mcast_demux_lookup()
2224 sk_for_each_rcu(sk, &hslot->head) { in __udp4_lib_mcast_demux_lookup()
2626 struct udp_hslot *hslot = &state->udp_table->hash[state->bucket]; in udp_get_first() local
2628 if (hlist_empty(&hslot->head)) in udp_get_first()
2631 spin_lock_bh(&hslot->lock); in udp_get_first()
2632 sk_for_each(sk, &hslot->head) { in udp_get_first()
2638 spin_unlock_bh(&hslot->lock); in udp_get_first()