Searched refs:n_buckets (Results 1 – 3 of 3) sorted by relevance
30 u32 n_buckets; member74 u64 cost, n_buckets; in stack_map_alloc() local98 n_buckets = roundup_pow_of_two(attr->max_entries); in stack_map_alloc()99 if (!n_buckets) in stack_map_alloc()102 cost = n_buckets * sizeof(struct stack_map_bucket *) + sizeof(*smap); in stack_map_alloc()108 smap->n_buckets = n_buckets; in stack_map_alloc()232 id = hash & (smap->n_buckets - 1); in __bpf_get_stackid()584 if (unlikely(id >= smap->n_buckets)) in bpf_stackmap_copy()614 if (id >= smap->n_buckets || !smap->buckets[id]) in stack_map_get_next_key()620 while (id < smap->n_buckets && !smap->buckets[id]) in stack_map_get_next_key()[all …]
103 u32 n_buckets; /* number of hash buckets */ member140 for (i = 0; i < htab->n_buckets; i++) { in htab_init_buckets()155 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_lock_bucket()176 hash = hash & min_t(u32, HASHTAB_MAP_LOCK_MASK, htab->n_buckets - 1); in htab_unlock_bucket()499 htab->n_buckets = roundup_pow_of_two(htab->map.max_entries); in htab_map_alloc()510 if (htab->n_buckets == 0 || in htab_map_alloc()511 htab->n_buckets > U32_MAX / sizeof(struct bucket)) in htab_map_alloc()515 htab->buckets = bpf_map_area_alloc(htab->n_buckets * in htab_map_alloc()610 return &htab->buckets[hash & (htab->n_buckets - 1)]; in __select_bucket()638 u32 key_size, u32 n_buckets) in lookup_nulls_elem_raw() argument[all …]
84 u32 n_buckets; member108 return &dtab->dev_index_head[idx & (dtab->n_buckets - 1)]; in dev_map_index_hash()134 dtab->n_buckets = roundup_pow_of_two(dtab->map.max_entries); in dev_map_init_map()136 if (!dtab->n_buckets) /* Overflow check */ in dev_map_init_map()141 dtab->dev_index_head = dev_map_create_hash(dtab->n_buckets, in dev_map_init_map()209 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_free()307 i = idx & (dtab->n_buckets - 1); in dev_map_hash_get_next_key()311 for (; i < dtab->n_buckets; i++) { in dev_map_hash_get_next_key()624 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_enqueue_multi()743 for (i = 0; i < dtab->n_buckets; i++) { in dev_map_redirect_multi()[all …]