Home
last modified time | relevance | path

Searched refs:bpf_array (Results 1 – 25 of 26) sorted by relevance

12

/linux/kernel/bpf/
H A Darraymap.c22 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu()
32 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu()
90 struct bpf_array *array; in array_map_alloc()
138 array = data + PAGE_ALIGN(sizeof(struct bpf_array)) in array_map_alloc()
139 - offsetof(struct bpf_array, value); in array_map_alloc()
160 static void *array_map_elem_ptr(struct bpf_array* array, u32 index) in array_map_elem_ptr()
168 struct bpf_array *array = container_of(map, struct bpf_array, map); in array_map_lookup_elem()
180 struct bpf_array *array = container_of(map, struct bpf_array, ma in array_map_direct_value_addr()
[all...]
H A Dmap_in_map.c30 inner_map_meta_size = sizeof(struct bpf_array); in bpf_map_meta_alloc()
65 struct bpf_array *inner_array_meta = in bpf_map_meta_alloc()
66 container_of(inner_map_meta, struct bpf_array, map); in bpf_map_meta_alloc()
67 struct bpf_array *inner_array = container_of(inner_map, struct bpf_array, map); in bpf_map_meta_alloc()
H A Dhelpers.c1170 struct bpf_array *array = container_of(map, struct bpf_array, map); in bpf_timer_cb()
1204 struct bpf_array *array = container_of(map, struct bpf_array, map); in bpf_wq_work()
2569 struct bpf_array *array = container_of(map, struct bpf_array, map); in BPF_CALL_2()
H A Dcore.c2045 struct bpf_array *array = container_of(map, struct bpf_array, map); in ___bpf_prog_run()
/linux/tools/testing/selftests/bpf/progs/
H A Dmap_ptr_kern.c135 struct bpf_array { struct
149 struct bpf_array *array = (struct bpf_array *)&m_array; in check_array() argument
181 struct bpf_array *prog_array = (struct bpf_array *)&m_prog_array; in check_prog_array()
198 struct bpf_array *perf_event_array = (struct bpf_array *)&m_perf_event_array; in check_perf_event_array()
232 struct bpf_array *percpu_array = (struct bpf_array *)&m_percpu_array; in check_percpu_array()
272 struct bpf_array *cgroup_arra in check_cgroup_array()
[all...]
/linux/arch/sparc/net/
H A Dbpf_jit_comp_64.c852 const u8 bpf_array = bpf2sparc[BPF_REG_2]; in emit_tail_call() local
859 off = offsetof(struct bpf_array, map.max_entries); in emit_tail_call()
860 emit(LD32 | IMMED | RS1(bpf_array) | S13(off) | RD(tmp), ctx); in emit_tail_call()
878 emit_alu(ADD, bpf_array, tmp, ctx); in emit_tail_call()
879 off = offsetof(struct bpf_array, ptrs); in emit_tail_call()
/linux/tools/lib/bpf/
H A Dskel_internal.h129 * ((struct bpf_array *)map)->value. See skel_finalize_map_data. in skel_free_map_data()
160 addr = ((struct bpf_array *)map)->value; in skel_finalize_map_data()
/linux/arch/parisc/net/
H A Dbpf_jit_comp64.c352 struct bpf_array bpfa; in emit_bpf_tail_call()
362 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
389 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
H A Dbpf_jit_comp32.c953 struct bpf_array bpfa; in emit_bpf_tail_call()
960 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
987 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
/linux/arch/mips/net/
H A Dbpf_jit_comp64.c493 off = offsetof(struct bpf_array, map.max_entries); in emit_tail_call()
505 off = offsetof(struct bpf_array, ptrs); in emit_tail_call()
H A Dbpf_jit_comp32.c1307 off = offsetof(struct bpf_array, map.max_entries); in emit_tail_call()
1323 off = offsetof(struct bpf_array, ptrs); in emit_tail_call()
/linux/arch/arm/net/
H A Dbpf_jit_32.c1396 /* bpf_tail_call(void *prog_ctx, struct bpf_array *array, u64 index) */ in emit_bpf_tail_call()
1413 BUILD_BUG_ON(offsetof(struct bpf_array, map.max_entries) > in emit_bpf_tail_call()
1415 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
1446 BUILD_BUG_ON(imm8m(offsetof(struct bpf_array, ptrs)) < 0); in emit_bpf_tail_call()
1447 off = imm8m(offsetof(struct bpf_array, ptrs)); in emit_bpf_tail_call()
/linux/arch/powerpc/net/
H A Dbpf_jit_comp64.c313 * r4/BPF_REG_2 - pointer to bpf_array in bpf_jit_emit_tail_call()
314 * r5/BPF_REG_3 - index in bpf_array in bpf_jit_emit_tail_call()
327 EMIT(PPC_RAW_LWZ(bpf_to_ppc(TMP_REG_1), b2p_bpf_array, offsetof(struct bpf_array, map.max_entries))); in bpf_jit_emit_tail_call()
349 EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
H A Dbpf_jit_comp32.c231 * r5-r6/BPF_REG_2 - pointer to bpf_array in bpf_jit_emit_tail_call()
232 * r7-r8/BPF_REG_3 - index in bpf_array in bpf_jit_emit_tail_call()
241 EMIT(PPC_RAW_LWZ(_R0, b2p_bpf_array, offsetof(struct bpf_array, map.max_entries))); in bpf_jit_emit_tail_call()
258 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
/linux/arch/x86/net/
H A Dbpf_jit_comp.c707 * ... bpf_tail_call(void *ctx, struct bpf_array *array, u64 index) ...
729 * rsi - pointer to bpf_array in emit_bpf_tail_call_indirect()
730 * rdx - index in bpf_array in emit_bpf_tail_call_indirect()
739 offsetof(struct bpf_array, map.max_entries)); in emit_bpf_tail_call_indirect()
756 offsetof(struct bpf_array, ptrs)); in emit_bpf_tail_call_indirect()
866 struct bpf_array *array; in bpf_tail_call_direct_fixup()
880 array = container_of(poke->tail_call.map, struct bpf_array, map); in bpf_tail_call_direct_fixup()
H A Dbpf_jit_comp32.c1288 * ... bpf_tail_call(void *ctx, struct bpf_array *array, u64 index) ...
1321 offsetof(struct bpf_array, map.max_entries)); in emit_bpf_tail_call()
1355 EMIT3_off32(0x8B, 0x94, 0x90, offsetof(struct bpf_array, ptrs)); in emit_bpf_tail_call()
/linux/kernel/trace/
H A Dbpf_trace.c541 struct bpf_array *array = container_of(map, struct bpf_array, map); in get_map_perf_counter()
620 struct bpf_array *array = container_of(map, struct bpf_array, map); in __bpf_perf_event_output()
/linux/arch/riscv/net/
H A Dbpf_jit_comp32.c789 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
815 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
H A Dbpf_jit_comp64.c371 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
390 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
/linux/arch/loongarch/net/
H A Dbpf_jit.c283 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
307 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
/linux/arch/s390/net/
H A Dbpf_jit_comp.c1836 * B2: pointer to bpf_array in bpf_jit_insn()
1837 * B3: index in bpf_array in bpf_jit_insn()
1845 offsetof(struct bpf_array, map.max_entries)); in bpf_jit_insn()
1880 REG_1, offsetof(struct bpf_array, ptrs)); in bpf_jit_insn()
/linux/arch/arm64/net/
H A Dbpf_jit_comp.c625 /* bpf_tail_call(void *prog_ctx, struct bpf_array *array, u64 index) */ in emit_bpf_tail_call()
641 off = offsetof(struct bpf_array, map.max_entries); in emit_bpf_tail_call()
666 off = offsetof(struct bpf_array, ptrs); in emit_bpf_tail_call()
/linux/lib/
H A Dtest_bpf.c15447 static void __init destroy_tail_call_tests(struct bpf_array *progs) in destroy_tail_call_tests()
15457 static __init int prepare_tail_call_tests(struct bpf_array **pprogs) in prepare_tail_call_tests()
15460 struct bpf_array *progs; in prepare_tail_call_tests()
15575 static __init int test_tail_calls(struct bpf_array *progs) in test_tail_calls()
15715 struct bpf_array *progs = NULL; in test_bpf_init()
/linux/include/linux/
H A Dbpf.h2064 struct bpf_array { struct
2068 auxbpf_array global() argument
2069 __anon91dc34de140abpf_array global() argument
/linux/net/core/
H A Dfilter.c4949 struct bpf_array *array = container_of(map, struct bpf_array, map); in BPF_CALL_3()

12