Lines Matching refs:nht

146 	struct neigh_hash_table *nht;  in neigh_remove_one()  local
152 nht = rcu_dereference_protected(tbl->nht, in neigh_remove_one()
154 hash_val = tbl->hash(pkey, ndel->dev, nht->hash_rnd); in neigh_remove_one()
155 hash_val = hash_val >> (32 - nht->hash_shift); in neigh_remove_one()
157 np = &nht->hash_buckets[hash_val]; in neigh_remove_one()
171 struct neigh_hash_table *nht; in neigh_forced_gc() local
176 nht = rcu_dereference_protected(tbl->nht, in neigh_forced_gc()
178 for (i = 0; i < (1 << nht->hash_shift); i++) { in neigh_forced_gc()
182 np = &nht->hash_buckets[i]; in neigh_forced_gc()
238 struct neigh_hash_table *nht; in neigh_flush_dev() local
240 nht = rcu_dereference_protected(tbl->nht, in neigh_flush_dev()
243 for (i = 0; i < (1 << nht->hash_shift); i++) { in neigh_flush_dev()
245 struct neighbour __rcu **np = &nht->hash_buckets[i]; in neigh_flush_dev()
384 struct neigh_hash_table *nht = container_of(head, in neigh_hash_free_rcu() local
387 size_t size = (1 << nht->hash_shift) * sizeof(struct neighbour *); in neigh_hash_free_rcu()
388 struct neighbour __rcu **buckets = nht->hash_buckets; in neigh_hash_free_rcu()
394 kfree(nht); in neigh_hash_free_rcu()
405 old_nht = rcu_dereference_protected(tbl->nht, in neigh_hash_grow()
433 rcu_assign_pointer(tbl->nht, new_nht); in neigh_hash_grow()
464 struct neigh_hash_table *nht; in neigh_lookup_nodev() local
469 nht = rcu_dereference_bh(tbl->nht); in neigh_lookup_nodev()
470 hash_val = tbl->hash(pkey, NULL, nht->hash_rnd) >> (32 - nht->hash_shift); in neigh_lookup_nodev()
472 for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]); in neigh_lookup_nodev()
496 struct neigh_hash_table *nht; in __neigh_create() local
531 nht = rcu_dereference_protected(tbl->nht, in __neigh_create()
534 if (atomic_read(&tbl->entries) > (1 << nht->hash_shift)) in __neigh_create()
535 nht = neigh_hash_grow(tbl, nht->hash_shift + 1); in __neigh_create()
537 hash_val = tbl->hash(n->primary_key, dev, nht->hash_rnd) >> (32 - nht->hash_shift); in __neigh_create()
544 for (n1 = rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
561 rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
563 rcu_assign_pointer(nht->hash_buckets[hash_val], n); in __neigh_create()
792 struct neigh_hash_table *nht; in neigh_periodic_work() local
797 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
815 for (i = 0 ; i < (1 << nht->hash_shift); i++) { in neigh_periodic_work()
816 np = &nht->hash_buckets[i]; in neigh_periodic_work()
855 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
1574 RCU_INIT_POINTER(tbl->nht, neigh_hash_alloc(3)); in neigh_table_init()
1579 if (!tbl->nht || !tbl->phash_buckets) in neigh_table_init()
1614 call_rcu(&rcu_dereference_protected(tbl->nht, 1)->rcu, in neigh_table_clear()
1616 tbl->nht = NULL; in neigh_table_clear()
1882 struct neigh_hash_table *nht; in neightbl_fill_info() local
1893 nht = rcu_dereference_bh(tbl->nht); in neightbl_fill_info()
1894 ndc.ndtc_hash_rnd = nht->hash_rnd[0]; in neightbl_fill_info()
1895 ndc.ndtc_hash_mask = ((1 << nht->hash_shift) - 1); in neightbl_fill_info()
2338 struct neigh_hash_table *nht; in neigh_dump_table() local
2360 nht = rcu_dereference_bh(tbl->nht); in neigh_dump_table()
2362 for (h = s_h; h < (1 << nht->hash_shift); h++) { in neigh_dump_table()
2365 for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0; in neigh_dump_table()
2473 struct neigh_hash_table *nht; in neigh_for_each() local
2476 nht = rcu_dereference_bh(tbl->nht); in neigh_for_each()
2479 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in neigh_for_each()
2482 for (n = rcu_dereference_bh(nht->hash_buckets[chain]); in neigh_for_each()
2497 struct neigh_hash_table *nht; in __neigh_for_each_release() local
2499 nht = rcu_dereference_protected(tbl->nht, in __neigh_for_each_release()
2501 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in __neigh_for_each_release()
2505 np = &nht->hash_buckets[chain]; in __neigh_for_each_release()
2571 struct neigh_hash_table *nht = state->nht; in neigh_get_first() local
2576 for (bucket = 0; bucket < (1 << nht->hash_shift); bucket++) { in neigh_get_first()
2577 n = rcu_dereference_bh(nht->hash_buckets[bucket]); in neigh_get_first()
2612 struct neigh_hash_table *nht = state->nht; in neigh_get_next() local
2643 if (++state->bucket >= (1 << nht->hash_shift)) in neigh_get_next()
2646 n = rcu_dereference_bh(nht->hash_buckets[state->bucket]); in neigh_get_next()
2756 state->nht = rcu_dereference_bh(tbl->nht); in neigh_seq_start()