Lines Matching refs:n_buckets
102 u32 n_buckets; /* number of hash buckets */ member
144 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()
166 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_lock_bucket()
197 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_unlock_bucket()
508 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()
519 if (htab->n_buckets == 0 || in htab_map_alloc()
520 htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc()
524 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()
582 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()
610 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument
620 if (unlikely(get_nulls_value(n) != (hash & (n_buckets - 1)))) in lookup_nulls_elem_raw()
647 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in __htab_map_lookup_elem()
799 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in htab_map_get_next_key()
815 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
820 for (; i < htab->n_buckets; i++) { in htab_map_get_next_key()
1058 htab->n_buckets); in htab_map_update_elem()
1411 for (i = 0; i < htab->n_buckets; i++) { in delete_all_elements()
1428 for (i = 0; i < htab->n_buckets; i++) { in htab_free_malloced_timers()
1639 if (batch >= htab->n_buckets) in __htab_map_lookup_and_delete_batch()
1775 if (!bucket_cnt && (batch + 1 < htab->n_buckets)) { in __htab_map_lookup_and_delete_batch()
1792 if (batch >= htab->n_buckets) { in __htab_map_lookup_and_delete_batch()
1904 if (bucket_id >= htab->n_buckets) in bpf_hash_map_seq_find_next()
1923 for (i = bucket_id; i < htab->n_buckets; i++) { in bpf_hash_map_seq_find_next()
2094 for (i = 0; i < htab->n_buckets; i++) { in bpf_for_each_hash_elem()
2327 for (i = 0; i < htab->n_buckets; i++) { in fd_htab_map_free()