Lines Matching refs:hashinfo
183 struct inet_hashinfo *hashinfo = tcp_or_dccp_get_hashinfo(sk); in __inet_put_port() local
189 bhash = inet_bhashfn(net, inet_sk(sk)->inet_num, hashinfo->bhash_size); in __inet_put_port()
190 head = &hashinfo->bhash[bhash]; in __inet_put_port()
191 head2 = inet_bhashfn_portaddr(hashinfo, sk, net, inet_sk(sk)->inet_num); in __inet_put_port()
198 inet_bind_bucket_destroy(hashinfo->bind_bucket_cachep, tb); in __inet_put_port()
206 inet_bind2_bucket_destroy(hashinfo->bind2_bucket_cachep, tb2); in __inet_put_port()
433 struct inet_hashinfo *hashinfo, in __inet_lookup_listener() argument
445 hashinfo == net->ipv4.tcp_death_row.hashinfo) { in __inet_lookup_listener()
454 ilb2 = inet_lhash2_bucket(hashinfo, hash2); in __inet_lookup_listener()
464 ilb2 = inet_lhash2_bucket(hashinfo, hash2); in __inet_lookup_listener()
498 struct inet_hashinfo *hashinfo, in __inet_lookup_established() argument
511 unsigned int slot = hash & hashinfo->ehash_mask; in __inet_lookup_established()
512 struct inet_ehash_bucket *head = &hashinfo->ehash[slot]; in __inet_lookup_established()
548 struct inet_hashinfo *hinfo = death_row->hashinfo; in __inet_check_established()
663 struct inet_hashinfo *hashinfo = tcp_or_dccp_get_hashinfo(sk); in inet_ehash_insert() local
672 head = inet_ehash_bucket(hashinfo, sk->sk_hash); in inet_ehash_insert()
674 lock = inet_ehash_lockp(hashinfo, sk->sk_hash); in inet_ehash_insert()
735 struct inet_hashinfo *hashinfo = tcp_or_dccp_get_hashinfo(sk); in __inet_hash() local
746 ilb2 = inet_lhash2_bucket_sk(hashinfo, sk); in __inet_hash()
781 struct inet_hashinfo *hashinfo = tcp_or_dccp_get_hashinfo(sk); in inet_unhash() local
789 ilb2 = inet_lhash2_bucket_sk(hashinfo, sk); in inet_unhash()
806 spinlock_t *lock = inet_ehash_lockp(hashinfo, sk->sk_hash); in inet_unhash()
1005 struct inet_hashinfo *hinfo = death_row->hashinfo; in __inet_hash_connect()
1207 int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo) in inet_ehash_locks_alloc() argument
1218 nblocks = min(nblocks, hashinfo->ehash_mask + 1); in inet_ehash_locks_alloc()
1220 hashinfo->ehash_locks = kvmalloc_array(nblocks, locksz, GFP_KERNEL); in inet_ehash_locks_alloc()
1221 if (!hashinfo->ehash_locks) in inet_ehash_locks_alloc()
1225 spin_lock_init(&hashinfo->ehash_locks[i]); in inet_ehash_locks_alloc()
1227 hashinfo->ehash_locks_mask = nblocks - 1; in inet_ehash_locks_alloc()
1232 struct inet_hashinfo *inet_pernet_hashinfo_alloc(struct inet_hashinfo *hashinfo, in inet_pernet_hashinfo_alloc() argument
1238 new_hashinfo = kmemdup(hashinfo, sizeof(*hashinfo), GFP_KERNEL); in inet_pernet_hashinfo_alloc()
1268 void inet_pernet_hashinfo_free(struct inet_hashinfo *hashinfo) in inet_pernet_hashinfo_free() argument
1270 if (!hashinfo->pernet) in inet_pernet_hashinfo_free()
1273 inet_ehash_locks_free(hashinfo); in inet_pernet_hashinfo_free()
1274 vfree(hashinfo->ehash); in inet_pernet_hashinfo_free()
1275 kfree(hashinfo); in inet_pernet_hashinfo_free()