Lines Matching refs:n_buckets
30 u32 n_buckets; member
93 u64 cost, n_buckets; in stack_map_alloc() local
117 n_buckets = roundup_pow_of_two(attr->max_entries); in stack_map_alloc()
118 if (!n_buckets) in stack_map_alloc()
121 cost = n_buckets * sizeof(struct stack_map_bucket *) + sizeof(*smap); in stack_map_alloc()
122 cost += n_buckets * (value_size + sizeof(struct stack_map_bucket)); in stack_map_alloc()
129 smap->n_buckets = n_buckets; in stack_map_alloc()
286 id = hash & (smap->n_buckets - 1); in __bpf_get_stackid()
627 if (unlikely(id >= smap->n_buckets)) in bpf_stackmap_copy()
657 if (id >= smap->n_buckets || !smap->buckets[id]) in stack_map_get_next_key()
663 while (id < smap->n_buckets && !smap->buckets[id]) in stack_map_get_next_key()
666 if (id >= smap->n_buckets) in stack_map_get_next_key()
686 if (unlikely(id >= smap->n_buckets)) in stack_map_delete_elem()