Lines Matching refs:dccp_hashinfo
48 struct inet_hashinfo dccp_hashinfo; variable
49 EXPORT_SYMBOL_GPL(dccp_hashinfo);
1112 rc = inet_hashinfo2_init_mod(&dccp_hashinfo); in dccp_init()
1116 dccp_hashinfo.bind_bucket_cachep = in dccp_init()
1120 if (!dccp_hashinfo.bind_bucket_cachep) in dccp_init()
1122 dccp_hashinfo.bind2_bucket_cachep = in dccp_init()
1126 if (!dccp_hashinfo.bind2_bucket_cachep) in dccp_init()
1151 dccp_hashinfo.ehash_mask = hash_size - 1; in dccp_init()
1152 dccp_hashinfo.ehash = (struct inet_ehash_bucket *) in dccp_init()
1154 } while (!dccp_hashinfo.ehash && --ehash_order > 0); in dccp_init()
1156 if (!dccp_hashinfo.ehash) { in dccp_init()
1161 for (i = 0; i <= dccp_hashinfo.ehash_mask; i++) in dccp_init()
1162 INIT_HLIST_NULLS_HEAD(&dccp_hashinfo.ehash[i].chain, i); in dccp_init()
1164 if (inet_ehash_locks_alloc(&dccp_hashinfo)) in dccp_init()
1170 dccp_hashinfo.bhash_size = (1UL << bhash_order) * PAGE_SIZE / in dccp_init()
1172 if ((dccp_hashinfo.bhash_size > (64 * 1024)) && in dccp_init()
1175 dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) in dccp_init()
1177 } while (!dccp_hashinfo.bhash && --bhash_order >= 0); in dccp_init()
1179 if (!dccp_hashinfo.bhash) { in dccp_init()
1184 dccp_hashinfo.bhash2 = (struct inet_bind_hashbucket *) in dccp_init()
1187 if (!dccp_hashinfo.bhash2) { in dccp_init()
1192 for (i = 0; i < dccp_hashinfo.bhash_size; i++) { in dccp_init()
1193 spin_lock_init(&dccp_hashinfo.bhash[i].lock); in dccp_init()
1194 INIT_HLIST_HEAD(&dccp_hashinfo.bhash[i].chain); in dccp_init()
1195 spin_lock_init(&dccp_hashinfo.bhash2[i].lock); in dccp_init()
1196 INIT_HLIST_HEAD(&dccp_hashinfo.bhash2[i].chain); in dccp_init()
1199 dccp_hashinfo.pernet = false; in dccp_init()
1228 free_pages((unsigned long)dccp_hashinfo.bhash2, bhash_order); in dccp_init()
1230 free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order); in dccp_init()
1232 inet_ehash_locks_free(&dccp_hashinfo); in dccp_init()
1234 free_pages((unsigned long)dccp_hashinfo.ehash, ehash_order); in dccp_init()
1236 kmem_cache_destroy(dccp_hashinfo.bind2_bucket_cachep); in dccp_init()
1238 kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); in dccp_init()
1240 inet_hashinfo2_free_mod(&dccp_hashinfo); in dccp_init()
1242 dccp_hashinfo.bhash = NULL; in dccp_init()
1243 dccp_hashinfo.bhash2 = NULL; in dccp_init()
1244 dccp_hashinfo.ehash = NULL; in dccp_init()
1245 dccp_hashinfo.bind_bucket_cachep = NULL; in dccp_init()
1246 dccp_hashinfo.bind2_bucket_cachep = NULL; in dccp_init()
1252 int bhash_order = get_order(dccp_hashinfo.bhash_size * in dccp_fini()
1257 free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order); in dccp_fini()
1258 free_pages((unsigned long)dccp_hashinfo.bhash2, bhash_order); in dccp_fini()
1259 free_pages((unsigned long)dccp_hashinfo.ehash, in dccp_fini()
1260 get_order((dccp_hashinfo.ehash_mask + 1) * in dccp_fini()
1262 inet_ehash_locks_free(&dccp_hashinfo); in dccp_fini()
1263 kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); in dccp_fini()
1266 inet_hashinfo2_free_mod(&dccp_hashinfo); in dccp_fini()