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()
346 struct neigh_hash_table *nht = container_of(head, in neigh_hash_free_rcu() local
349 size_t size = (1 << nht->hash_shift) * sizeof(struct neighbour *); in neigh_hash_free_rcu()
350 struct neighbour __rcu **buckets = nht->hash_buckets; in neigh_hash_free_rcu()
356 kfree(nht); in neigh_hash_free_rcu()
367 old_nht = rcu_dereference_protected(tbl->nht, in neigh_hash_grow()
395 rcu_assign_pointer(tbl->nht, new_nht); in neigh_hash_grow()
426 struct neigh_hash_table *nht; in neigh_lookup_nodev() local
431 nht = rcu_dereference_bh(tbl->nht); in neigh_lookup_nodev()
432 hash_val = tbl->hash(pkey, NULL, nht->hash_rnd) >> (32 - nht->hash_shift); in neigh_lookup_nodev()
434 for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]); in neigh_lookup_nodev()
458 struct neigh_hash_table *nht; in __neigh_create() local
493 nht = rcu_dereference_protected(tbl->nht, in __neigh_create()
496 if (atomic_read(&tbl->entries) > (1 << nht->hash_shift)) in __neigh_create()
497 nht = neigh_hash_grow(tbl, nht->hash_shift + 1); in __neigh_create()
499 hash_val = tbl->hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift); in __neigh_create()
506 for (n1 = rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
523 rcu_dereference_protected(nht->hash_buckets[hash_val], in __neigh_create()
525 rcu_assign_pointer(nht->hash_buckets[hash_val], n); in __neigh_create()
746 struct neigh_hash_table *nht; in neigh_periodic_work() local
751 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
769 for (i = 0 ; i < (1 << nht->hash_shift); i++) { in neigh_periodic_work()
770 np = &nht->hash_buckets[i]; in neigh_periodic_work()
808 nht = rcu_dereference_protected(tbl->nht, in neigh_periodic_work()
1519 RCU_INIT_POINTER(tbl->nht, neigh_hash_alloc(3)); in neigh_table_init()
1524 if (!tbl->nht || !tbl->phash_buckets) in neigh_table_init()
1559 call_rcu(&rcu_dereference_protected(tbl->nht, 1)->rcu, in neigh_table_clear()
1561 tbl->nht = NULL; in neigh_table_clear()
1816 struct neigh_hash_table *nht; in neightbl_fill_info() local
1827 nht = rcu_dereference_bh(tbl->nht); in neightbl_fill_info()
1828 ndc.ndtc_hash_rnd = nht->hash_rnd[0]; in neightbl_fill_info()
1829 ndc.ndtc_hash_mask = ((1 << nht->hash_shift) - 1); in neightbl_fill_info()
2269 struct neigh_hash_table *nht; in neigh_dump_table() local
2287 nht = rcu_dereference_bh(tbl->nht); in neigh_dump_table()
2289 for (h = s_h; h < (1 << nht->hash_shift); h++) { in neigh_dump_table()
2292 for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0; in neigh_dump_table()
2405 struct neigh_hash_table *nht; in neigh_for_each() local
2408 nht = rcu_dereference_bh(tbl->nht); in neigh_for_each()
2411 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in neigh_for_each()
2414 for (n = rcu_dereference_bh(nht->hash_buckets[chain]); in neigh_for_each()
2429 struct neigh_hash_table *nht; in __neigh_for_each_release() local
2431 nht = rcu_dereference_protected(tbl->nht, in __neigh_for_each_release()
2433 for (chain = 0; chain < (1 << nht->hash_shift); chain++) { in __neigh_for_each_release()
2437 np = &nht->hash_buckets[chain]; in __neigh_for_each_release()
2499 struct neigh_hash_table *nht = state->nht; in neigh_get_first() local
2504 for (bucket = 0; bucket < (1 << nht->hash_shift); bucket++) { in neigh_get_first()
2505 n = rcu_dereference_bh(nht->hash_buckets[bucket]); in neigh_get_first()
2540 struct neigh_hash_table *nht = state->nht; in neigh_get_next() local
2571 if (++state->bucket >= (1 << nht->hash_shift)) in neigh_get_next()
2574 n = rcu_dereference_bh(nht->hash_buckets[state->bucket]); in neigh_get_next()
2684 state->nht = rcu_dereference_bh(tbl->nht); in neigh_seq_start()