Lines Matching refs:n_buckets
99 u32 n_buckets; /* number of hash buckets */ member
139 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()
447 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()
458 if (htab->n_buckets == 0 || in htab_map_alloc()
459 htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc()
462 cost = (u64) htab->n_buckets * sizeof(struct bucket) + in htab_map_alloc()
477 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()
525 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()
553 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument
563 if (unlikely(get_nulls_value(n) != (hash & (n_buckets - 1)))) in lookup_nulls_elem_raw()
589 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in __htab_map_lookup_elem()
729 l = lookup_nulls_elem_raw(head, hash, key, key_size, htab->n_buckets); in htab_map_get_next_key()
745 i = hash & (htab->n_buckets - 1); in htab_map_get_next_key()
750 for (; i < htab->n_buckets; i++) { in htab_map_get_next_key()
984 htab->n_buckets); in htab_map_update_elem()
1308 for (i = 0; i < htab->n_buckets; i++) { in delete_all_elements()
1409 if (batch >= htab->n_buckets) in __htab_map_lookup_and_delete_batch()
1539 if (!bucket_cnt && (batch + 1 < htab->n_buckets)) { in __htab_map_lookup_and_delete_batch()
1556 if (batch >= htab->n_buckets) { in __htab_map_lookup_and_delete_batch()
1668 if (bucket_id >= htab->n_buckets) in bpf_hash_map_seq_find_next()
1687 for (i = bucket_id; i < htab->n_buckets; i++) { in bpf_hash_map_seq_find_next()
2018 for (i = 0; i < htab->n_buckets; i++) { in fd_htab_map_free()