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()
321 if (unlikely(index >= array->map.max_entries)) in array_map_update_elem()
362 if (unlikely(index >= array->map.max_entries)) in bpf_percpu_array_update()
408 for (i = 0; i < array->map.max_entries; i++) in array_map_free_timers()
420 for (i = 0; i < array->map.max_entries; i++) { in array_map_free()
430 for (i = 0; i < array->map.max_entries; i++) in array_map_free()
498 map->max_entries != 1) in array_map_check_btf()
529 PAGE_ALIGN((u64)array->map.max_entries * array->elem_size)) in array_map_mmap()
542 meta0->max_entries == meta1->max_entries; in array_map_meta_equal()
558 if (info->index >= map->max_entries) in bpf_array_map_seq_start()
579 if (info->index >= map->max_entries) in bpf_array_map_seq_next()
705 for (i = 0; i < map->max_entries; i++) { in bpf_for_each_array_elem()
729 u64 entries = map->max_entries; in array_map_mem_usage()
810 for (i = 0; i < array->map.max_entries; i++) in fd_array_map_free()
852 if (index >= array->map.max_entries) in bpf_fd_array_map_update_elem()
880 if (index >= array->map.max_entries) in fd_array_map_delete_elem()
932 for (i = 0; i < array->map.max_entries; i++) in bpf_fd_array_map_clear()
1258 for (i = 0; i < array->map.max_entries; i++) { in perf_event_fd_array_release()
1377 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 6); in array_of_map_gen_lookup()
1380 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 5); in array_of_map_gen_lookup()