Lines Matching refs:n_buckets
104 u32 n_buckets; /* number of hash buckets */ member
141 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()
156 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_lock_bucket()
177 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_unlock_bucket()
515 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()
525 if (htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc()
533 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()
632 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()
660 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument
670 if (unlikely(get_nulls_value(n) != (hash & (n_buckets - 1)))) in lookup_nulls_elem_raw()
697 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in __htab_map_lookup_elem()
858 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in htab_map_get_next_key()
874 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
879 for (; i < htab->n_buckets; i++) { in htab_map_get_next_key()
1131 htab->n_buckets); in htab_map_update_elem()
1491 for (i = 0; i < htab->n_buckets; i++) { in delete_all_elements()
1510 for (i = 0; i < htab->n_buckets; i++) { in htab_free_malloced_timers_and_wq()
1736 if (batch >= htab->n_buckets) in __htab_map_lookup_and_delete_batch()
1881 if (!bucket_cnt && (batch + 1 < htab->n_buckets)) { in __htab_map_lookup_and_delete_batch()
1898 if (batch >= htab->n_buckets) { in __htab_map_lookup_and_delete_batch()
2010 if (bucket_id >= htab->n_buckets) in bpf_hash_map_seq_find_next()
2029 for (i = bucket_id; i < htab->n_buckets; i++) { in bpf_hash_map_seq_find_next()
2200 for (i = 0; i < htab->n_buckets; i++) { in bpf_for_each_hash_elem()
2240 usage += sizeof(struct bucket) * htab->n_buckets; in htab_map_mem_usage()
2520 for (i = 0; i < htab->n_buckets; i++) { in fd_htab_map_free()