Lines Matching refs:max_entries
26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
58 if (attr->max_entries == 0 || attr->key_size != 4 || in array_map_alloc_check()
84 u32 elem_size, index_mask, max_entries; in array_map_alloc() local
91 max_entries = attr->max_entries; in array_map_alloc()
97 mask64 = fls_long(max_entries - 1); in array_map_alloc()
106 max_entries = index_mask + 1; in array_map_alloc()
108 if (max_entries < attr->max_entries) in array_map_alloc()
114 array_size += (u64) max_entries * sizeof(void *); in array_map_alloc()
121 array_size += PAGE_ALIGN((u64) max_entries * elem_size); in array_map_alloc()
123 array_size += (u64) max_entries * elem_size; in array_map_alloc()
168 if (unlikely(index >= array->map.max_entries)) in array_map_lookup_elem()
179 if (map->max_entries != 1) in array_map_direct_value_addr()
195 if (map->max_entries != 1) in array_map_direct_value_meta()
220 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 4); in array_map_gen_lookup()
223 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 3); in array_map_gen_lookup()
243 if (unlikely(index >= array->map.max_entries)) in percpu_array_map_lookup_elem()
257 if (unlikely(index >= array->map.max_entries)) in percpu_array_map_lookup_percpu_elem()
271 if (unlikely(index >= array->map.max_entries)) in bpf_percpu_array_copy()
297 if (index >= array->map.max_entries) { in array_map_get_next_key()
302 if (index == array->map.max_entries - 1) in array_map_get_next_key()
329 if (unlikely(index >= array->map.max_entries)) in array_map_update_elem()
370 if (unlikely(index >= array->map.max_entries)) in bpf_percpu_array_update()
416 for (i = 0; i < array->map.max_entries; i++) in array_map_free_timers()
428 for (i = 0; i < array->map.max_entries; i++) { in array_map_free()
438 for (i = 0; i < array->map.max_entries; i++) in array_map_free()
507 map->max_entries != 1) in array_map_check_btf()
538 PAGE_ALIGN((u64)array->map.max_entries * array->elem_size)) in array_map_mmap()
551 meta0->max_entries == meta1->max_entries; in array_map_meta_equal()
567 if (info->index >= map->max_entries) in bpf_array_map_seq_start()
588 if (info->index >= map->max_entries) in bpf_array_map_seq_next()
714 for (i = 0; i < map->max_entries; i++) { in bpf_for_each_array_elem()
795 for (i = 0; i < array->map.max_entries; i++) in fd_array_map_free()
837 if (index >= array->map.max_entries) in bpf_fd_array_map_update_elem()
865 if (index >= array->map.max_entries) in fd_array_map_delete_elem()
917 for (i = 0; i < array->map.max_entries; i++) in bpf_fd_array_map_clear()
1242 for (i = 0; i < array->map.max_entries; i++) { in perf_event_fd_array_release()
1359 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 6); in array_of_map_gen_lookup()
1362 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 5); in array_of_map_gen_lookup()