Lines Matching refs:nht
123 struct neigh_hash_table *nht; in neigh_forced_gc() local
128 nht = rcu_dereference_protected(tbl->nht, in neigh_forced_gc()
130 for (i = 0; i < (1 << nht->hash_shift); i++) { in neigh_forced_gc()
134 np = &nht->hash_buckets[i]; in neigh_forced_gc()
198 struct neigh_hash_table *nht; in neigh_flush_dev() local
200 nht = rcu_dereference_protected(tbl->nht, in neigh_flush_dev()
203 for (i = 0; i < (1 << nht->hash_shift); i++) { in neigh_flush_dev()
205 struct neighbour __rcu **np = &nht->hash_buckets[i]; in neigh_flush_dev()
342 struct neigh_hash_table *nht = container_of(head, in neigh_hash_free_rcu() local
345 size_t size = (1 << nht->hash_shift) * sizeof(struct neighbour *); in neigh_hash_free_rcu()
346 struct neighbour __rcu **buckets = nht->hash_buckets; in neigh_hash_free_rcu()
352 kfree(nht); in neigh_hash_free_rcu()
363 old_nht = rcu_dereference_protected(tbl->nht, in neigh_hash_grow()
391 rcu_assign_pointer(tbl->nht, new_nht); in neigh_hash_grow()
422 struct neigh_hash_table *nht; in neigh_lookup_nodev() local
427 nht = rcu_dereference_bh(tbl->nht); in neigh_lookup_nodev()
428 hash_val = tbl->hash(pkey, NULL, nht->hash_rnd) >> (32 - nht->hash_shift); in neigh_lookup_nodev()
430 for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]); in neigh_lookup_nodev()
454 struct neigh_hash_table *nht; in __neigh_create() local
489 nht = rcu_dereference_protected(tbl->nht, in __neigh_create()
492 if (atomic_read(&tbl->entries) > (1 << nht->hash_shift)) in __neigh_create()
493 nht = neigh_hash_grow(tbl, nht->hash_shift + 1); in __neigh_create()
495 hash_val = tbl->hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift); in __neigh_create()
502 for (n1 = rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
519 rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
521 rcu_assign_pointer(nht->hash_buckets[hash_val], n); in __neigh_create()
742 struct neigh_hash_table *nht; in neigh_periodic_work() local
747 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
765 for (i = 0 ; i < (1 << nht->hash_shift); i++) { in neigh_periodic_work()
766 np = &nht->hash_buckets[i]; in neigh_periodic_work()
804 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
1512 RCU_INIT_POINTER(tbl->nht, neigh_hash_alloc(3)); in neigh_table_init()
1517 if (!tbl->nht || !tbl->phash_buckets) in neigh_table_init()
1552 call_rcu(&rcu_dereference_protected(tbl->nht, 1)->rcu, in neigh_table_clear()
1554 tbl->nht = NULL; in neigh_table_clear()
1809 struct neigh_hash_table *nht; in neightbl_fill_info() local
1820 nht = rcu_dereference_bh(tbl->nht); in neightbl_fill_info()
1821 ndc.ndtc_hash_rnd = nht->hash_rnd[0]; in neightbl_fill_info()
1822 ndc.ndtc_hash_mask = ((1 << nht->hash_shift) - 1); in neightbl_fill_info()
2237 struct neigh_hash_table *nht; in neigh_dump_table() local
2240 nht = rcu_dereference_bh(tbl->nht); in neigh_dump_table()
2242 for (h = s_h; h < (1 << nht->hash_shift); h++) { in neigh_dump_table()
2245 for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0; in neigh_dump_table()
2354 struct neigh_hash_table *nht; in neigh_for_each() local
2357 nht = rcu_dereference_bh(tbl->nht); in neigh_for_each()
2360 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in neigh_for_each()
2363 for (n = rcu_dereference_bh(nht->hash_buckets[chain]); in neigh_for_each()
2378 struct neigh_hash_table *nht; in __neigh_for_each_release() local
2380 nht = rcu_dereference_protected(tbl->nht, in __neigh_for_each_release()
2382 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in __neigh_for_each_release()
2386 np = &nht->hash_buckets[chain]; in __neigh_for_each_release()
2448 struct neigh_hash_table *nht = state->nht; in neigh_get_first() local
2453 for (bucket = 0; bucket < (1 << nht->hash_shift); bucket++) { in neigh_get_first()
2454 n = rcu_dereference_bh(nht->hash_buckets[bucket]); in neigh_get_first()
2489 struct neigh_hash_table *nht = state->nht; in neigh_get_next() local
2520 if (++state->bucket >= (1 << nht->hash_shift)) in neigh_get_next()
2523 n = rcu_dereference_bh(nht->hash_buckets[state->bucket]); in neigh_get_next()
2633 state->nht = rcu_dereference_bh(tbl->nht); in neigh_seq_start()