Lines Matching defs:array

201 /* The jit engine is responsible to provide an array
204 * The idx to this array is the insn_off. Hence, the insn_off
206 * This array has one entry for each xlated bpf insn.
1701 * @regs: is the array of MAX_BPF_EXT_REG eBPF pseudo-registers
1702 * @insn: is the array of eBPF instructions
2013 struct bpf_array *array = container_of(map, struct bpf_array, map);
2017 if (unlikely(index >= array->map.max_entries))
2025 prog = READ_ONCE(array->ptrs[index]);
2592 int bpf_prog_array_length(struct bpf_prog_array *array)
2597 for (item = array->items; item->prog; item++)
2603 bool bpf_prog_array_is_empty(struct bpf_prog_array *array)
2607 for (item = array->items; item->prog; item++)
2613 static bool bpf_prog_array_copy_core(struct bpf_prog_array *array,
2620 for (item = array->items; item->prog; item++) {
2633 int bpf_prog_array_copy_to_user(struct bpf_prog_array *array,
2649 nospc = bpf_prog_array_copy_core(array, ids, cnt);
2659 void bpf_prog_array_delete_safe(struct bpf_prog_array *array,
2664 for (item = array->items; item->prog; item++)
2673 * index into the program array with
2675 * @array: a bpf_prog_array
2686 int bpf_prog_array_delete_safe_at(struct bpf_prog_array *array, int index)
2688 return bpf_prog_array_update_at(array, index, &dummy_bpf_prog.prog);
2693 * into the program array.
2694 * @array: a bpf_prog_array
2696 * @prog: the program to insert into the array
2706 int bpf_prog_array_update_at(struct bpf_prog_array *array, int index,
2714 for (item = array->items; item->prog; item++) {
2734 struct bpf_prog_array *array;
2738 * the new array.
2757 /* How many progs (not NULL) will be in the new array? */
2762 /* Do we have any prog (not NULL) in the new array? */
2769 array = bpf_prog_array_alloc(new_prog_cnt + 1, GFP_KERNEL);
2770 if (!array)
2772 new = array->items;
2774 /* Fill in the new prog array */
2793 *new_array = array;
2797 int bpf_prog_array_copy_info(struct bpf_prog_array *array,
2803 if (array)
2804 cnt = bpf_prog_array_length(array);
2813 return bpf_prog_array_copy_core(array, prog_ids, request_cnt) ? -ENOSPC