Home
last modified time | relevance | path

Searched refs:bpf_map (Results 1 – 25 of 136) sorted by relevance

123456

/linux/tools/testing/selftests/bpf/progs/
H A Dmap_ptr_kern.c30 struct bpf_map { struct
38 static inline int check_bpf_map_fields(struct bpf_map *map, __u32 key_size, in check_bpf_map_fields() argument
50 static inline int check_bpf_map_ptr(struct bpf_map *indirect, in check_bpf_map_ptr()
51 struct bpf_map *direct) in check_bpf_map_ptr()
62 static inline int check(struct bpf_map *indirect, struct bpf_map *direct, in check()
71 static inline int check_default(struct bpf_map *indirect, in check_default()
72 struct bpf_map *direct) in check_default()
80 check_default_noinline(struct bpf_map *indirect, struct bpf_map *direct) in check_default_noinline()
92 struct bpf_map map;
106 __s64 bpf_map_sum_elem_count(struct bpf_map *map) __ksym;
[all …]
H A Dtest_bpf_ma.c56 static __always_inline void batch_alloc(struct bpf_map *map, unsigned int batch, unsigned int idx) in batch_alloc()
83 static __always_inline void batch_free(struct bpf_map *map, unsigned int batch, unsigned int idx) in batch_free()
105 static __always_inline void batch_percpu_alloc(struct bpf_map *map, unsigned int batch, in batch_percpu_alloc()
133 static __always_inline void batch_percpu_free(struct bpf_map *map, unsigned int batch, in batch_percpu_free()
155 batch_alloc((struct bpf_map *)(&array_##size), batch, idx)
159 batch_alloc((struct bpf_map *)(&array_##size), batch, idx); \
160 batch_free((struct bpf_map *)(&array_##size), batch, idx); \
164 batch_percpu_alloc((struct bpf_map *)(&array_percpu_##size), batch, idx)
168 batch_percpu_alloc((struct bpf_map *)(&array_percpu_##size), batch, idx); \
169 batch_percpu_free((struct bpf_map *)(&array_percpu_##size), batch, idx); \
H A Dbloom_filter_map.c10 struct bpf_map;
35 struct bpf_map *map;
41 check_elem(struct bpf_map *map, __u32 *key, __u32 *val, in check_elem()
58 struct bpf_map *inner_map; in inner_map()
79 data.map = (struct bpf_map *)&map_bloom; in check_bloom()
H A Dbloom_filter_bench.c12 struct bpf_map;
43 struct bpf_map *map;
71 bloom_callback(struct bpf_map *map, __u32 *key, void *val, in bloom_callback()
96 data.map = (struct bpf_map *)&bloom_map; in bloom_lookup()
109 data.map = (struct bpf_map *)&bloom_map; in bloom_update()
H A Djeq_infer_not_null_fail.c24 struct bpf_map *map = (struct bpf_map *)&m_hash; in jeq_infer_not_null_ptr_to_btfid()
25 struct bpf_map *inner_map = map->inner_map_meta; in jeq_infer_not_null_ptr_to_btfid()
H A Dfor_each_array_map_elem.c29 unused_subprog(struct bpf_map *map, __u32 *key, __u64 *val, in unused_subprog()
37 check_array_elem(struct bpf_map *map, __u32 *key, __u64 *val, in check_array_elem()
50 check_percpu_elem(struct bpf_map *map, __u32 *key, __u64 *val, in check_percpu_elem()
H A Dmap_percpu_stats.c10 __s64 bpf_map_sum_elem_count(const struct bpf_map *map) __ksym;
16 struct bpf_map *map = ctx->map; in dump_bpf_map()
H A Dtest_libbpf_get_fd_by_id_opts.c27 int BPF_PROG(check_access, struct bpf_map *map, fmode_t fmode) in BPF_PROG()
29 if (map != (struct bpf_map *)&data_input) in BPF_PROG()
H A Dcore_kern.c28 struct bpf_map *map = (struct bpf_map *)&array1; in randmap()
33 map = (struct bpf_map *)&array2; in randmap()
/linux/kernel/bpf/
H A Dqueue_stack_maps.c18 struct bpf_map map;
26 static struct bpf_queue_stack *bpf_queue_stack(struct bpf_map *map) in bpf_queue_stack()
65 static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) in queue_stack_map_alloc()
88 static void queue_stack_map_free(struct bpf_map *map) in queue_stack_map_free()
95 static long __queue_map_get(struct bpf_map *map, void *value, bool delete) in __queue_map_get()
125 static long __stack_map_get(struct bpf_map *map, void *value, bool delete) in __stack_map_get()
158 static long queue_map_peek_elem(struct bpf_map *map, void *value) in queue_map_peek_elem()
164 static long stack_map_peek_elem(struct bpf_map *map, void *value) in stack_map_peek_elem()
170 static long queue_map_pop_elem(struct bpf_map *map, void *value) in queue_map_pop_elem()
176 static long stack_map_pop_elem(struct bpf_map *map, void *value) in stack_map_pop_elem()
[all …]
H A Dmap_in_map.c10 struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) in bpf_map_meta_alloc()
12 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_meta_alloc()
48 struct bpf_map *ret = ERR_CAST(inner_map_meta->record); in bpf_map_meta_alloc()
76 void bpf_map_meta_free(struct bpf_map *map_meta) in bpf_map_meta_free()
83 bool bpf_map_meta_equal(const struct bpf_map *meta0, in bpf_map_meta_equal()
84 const struct bpf_map *meta1) in bpf_map_meta_equal()
94 void *bpf_map_fd_get_ptr(struct bpf_map *map, in bpf_map_fd_get_ptr()
98 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_fd_get_ptr()
114 void bpf_map_fd_put_ptr(struct bpf_map *map, void *ptr, bool need_defer) in bpf_map_fd_put_ptr()
116 struct bpf_map *inner_map = ptr; in bpf_map_fd_put_ptr()
[all …]
H A Dbloom_filter.c16 struct bpf_map map;
36 static long bloom_map_peek_elem(struct bpf_map *map, void *value) in bloom_map_peek_elem()
51 static long bloom_map_push_elem(struct bpf_map *map, void *value, u64 flags) in bloom_map_push_elem()
68 static long bloom_map_pop_elem(struct bpf_map *map, void *value) in bloom_map_pop_elem()
73 static long bloom_map_delete_elem(struct bpf_map *map, void *value) in bloom_map_delete_elem()
78 static int bloom_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in bloom_map_get_next_key()
95 static struct bpf_map *bloom_map_alloc(union bpf_attr *attr) in bloom_map_alloc()
162 static void bloom_map_free(struct bpf_map *map) in bloom_map_free()
170 static void *bloom_map_lookup_elem(struct bpf_map *map, void *key) in bloom_map_lookup_elem()
176 static long bloom_map_update_elem(struct bpf_map *map, void *key, in bloom_map_update_elem()
[all …]
H A Dmap_in_map.h10 struct bpf_map;
12 struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd);
13 void bpf_map_meta_free(struct bpf_map *map_meta);
14 void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file,
16 void bpf_map_fd_put_ptr(struct bpf_map *map, void *ptr, bool need_defer);
H A Dmap_iter.c16 struct bpf_map *map; in bpf_map_seq_start()
33 bpf_map_put((struct bpf_map *)v); in bpf_map_seq_next()
39 __bpf_md_ptr(struct bpf_map *, map);
42 DEFINE_BPF_ITER_FUNC(bpf_map, struct bpf_iter_meta *meta, struct bpf_map *map) in DEFINE_BPF_ITER_FUNC() argument
71 bpf_map_put((struct bpf_map *)v); in bpf_map_seq_stop()
81 BTF_ID_LIST_GLOBAL_SINGLE(btf_bpf_map_id, struct, bpf_map)
105 struct bpf_map *map; in bpf_iter_attach_map()
165 struct bpf_map *map, void *key, void *value)
198 __bpf_kfunc s64 bpf_map_sum_elem_count(const struct bpf_map *map) in bpf_map_sum_elem_count()
H A Darena.c46 struct bpf_map map;
65 static long arena_map_peek_elem(struct bpf_map *map, void *value) in arena_map_peek_elem()
70 static long arena_map_push_elem(struct bpf_map *map, void *value, u64 flags) in arena_map_push_elem()
75 static long arena_map_pop_elem(struct bpf_map *map, void *value) in arena_map_pop_elem()
80 static long arena_map_delete_elem(struct bpf_map *map, void *value) in arena_map_delete_elem()
85 static int arena_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in arena_map_get_next_key()
95 static struct bpf_map *arena_map_alloc(union bpf_attr *attr) in arena_map_alloc()
174 static void arena_map_free(struct bpf_map *map) in arena_map_free()
200 static void *arena_map_lookup_elem(struct bpf_map *map, void *key) in arena_map_lookup_elem()
205 static long arena_map_update_elem(struct bpf_map *map, void *key, in arena_map_update_elem()
[all …]
H A Dreuseport_array.c12 struct bpf_map map;
16 static struct reuseport_array *reuseport_array(struct bpf_map *map) in reuseport_array()
50 static void *reuseport_array_lookup_elem(struct bpf_map *map, void *key) in reuseport_array_lookup_elem()
62 static long reuseport_array_delete_elem(struct bpf_map *map, void *key) in reuseport_array_delete_elem()
94 static void reuseport_array_free(struct bpf_map *map) in reuseport_array_free()
149 static struct bpf_map *reuseport_array_alloc(union bpf_attr *attr) in reuseport_array_alloc()
165 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_lookup_elem()
232 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_update_elem()
316 static int reuseport_array_get_next_key(struct bpf_map *map, void *key, in reuseport_array_get_next_key()
335 static u64 reuseport_array_mem_usage(const struct bpf_map *map) in reuseport_array_mem_usage()
H A Dringbuf.c82 struct bpf_map map;
193 static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) in ringbuf_map_alloc()
243 static void ringbuf_map_free(struct bpf_map *map) in ringbuf_map_free()
252 static void *ringbuf_map_lookup_elem(struct bpf_map *map, void *key) in ringbuf_map_lookup_elem()
257 static long ringbuf_map_update_elem(struct bpf_map *map, void *key, void *value, in ringbuf_map_update_elem()
263 static long ringbuf_map_delete_elem(struct bpf_map *map, void *key) in ringbuf_map_delete_elem()
268 static int ringbuf_map_get_next_key(struct bpf_map *map, void *key, in ringbuf_map_get_next_key()
274 static int ringbuf_map_mmap_kern(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_kern()
290 static int ringbuf_map_mmap_user(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_user()
335 static __poll_t ringbuf_map_poll_kern(struct bpf_map *map, struct file *filp, in ringbuf_map_poll_kern()
[all …]
H A Dcpumap.c78 struct bpf_map map;
83 static struct bpf_map *cpu_map_alloc(union bpf_attr *attr) in cpu_map_alloc()
409 struct bpf_map *map, int fd) in __cpu_map_load_bpf_program()
430 __cpu_map_entry_alloc(struct bpf_map *map, struct bpf_cpumap_val *value, in __cpu_map_entry_alloc()
557 static long cpu_map_delete_elem(struct bpf_map *map, void *key) in cpu_map_delete_elem()
570 static long cpu_map_update_elem(struct bpf_map *map, void *key, void *value, in cpu_map_update_elem()
608 static void cpu_map_free(struct bpf_map *map) in cpu_map_free()
644 static void *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) in __cpu_map_lookup_elem()
657 static void *cpu_map_lookup_elem(struct bpf_map *map, void *key) in cpu_map_lookup_elem()
665 static int cpu_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in cpu_map_get_next_key()
[all …]
H A Dlpm_trie.c34 struct bpf_map map;
238 static void *trie_lookup_elem(struct bpf_map *map, void *_key) in trie_lookup_elem()
322 static long trie_update_elem(struct bpf_map *map, in trie_update_elem()
457 static long trie_delete_elem(struct bpf_map *map, void *_key) in trie_delete_elem()
571 static struct bpf_map *trie_alloc(union bpf_attr *attr) in trie_alloc()
613 static void trie_free(struct bpf_map *map) in trie_free()
656 static int trie_get_next_key(struct bpf_map *map, void *_key, void *_next_key) in trie_get_next_key()
754 static int trie_check_btf(const struct bpf_map *map, in trie_check_btf()
764 static u64 trie_mem_usage(const struct bpf_map *map) in trie_mem_usage()
H A Dsyscall.c121 static void bpf_map_write_active_inc(struct bpf_map *map) in bpf_map_write_active_inc()
126 static void bpf_map_write_active_dec(struct bpf_map *map) in bpf_map_write_active_dec()
131 bool bpf_map_write_active(const struct bpf_map *map) in bpf_map_write_active()
136 static u32 bpf_map_value_size(const struct bpf_map *map) in bpf_map_value_size()
149 static void maybe_wait_bpf_programs(struct bpf_map *map) in maybe_wait_bpf_programs()
247 static int bpf_map_update_value(struct bpf_map *map, struct file *map_file, in bpf_map_update_value()
305 static int bpf_map_copy_value(struct bpf_map *map, void *key, void *value, in bpf_map_copy_value()
433 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr) in bpf_map_init_from_attr()
444 static int bpf_map_alloc_id(struct bpf_map *map) in bpf_map_alloc_id()
462 void bpf_map_free_id(struct bpf_map *map) in bpf_map_free_id()
[all …]
/linux/net/xdp/
H A Dxskmap.c64 static struct bpf_map *xsk_map_alloc(union bpf_attr *attr) in xsk_map_alloc()
88 static u64 xsk_map_mem_usage(const struct bpf_map *map) in xsk_map_mem_usage()
96 static void xsk_map_free(struct bpf_map *map) in xsk_map_free()
104 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in xsk_map_get_next_key()
121 static int xsk_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in xsk_map_gen_lookup()
141 static void *__xsk_map_lookup_elem(struct bpf_map *map, u32 key) in __xsk_map_lookup_elem()
151 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key) in xsk_map_lookup_elem()
156 static void *xsk_map_lookup_elem_sys_only(struct bpf_map *map, void *key) in xsk_map_lookup_elem_sys_only()
161 static long xsk_map_update_elem(struct bpf_map *map, void *key, void *value, in xsk_map_update_elem()
222 static long xsk_map_delete_elem(struct bpf_map *map, void *key) in xsk_map_delete_elem()
[all …]
/linux/net/core/
H A Dsock_map.c18 struct bpf_map map;
34 static int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
37 static struct sk_psock_progs *sock_map_progs(struct bpf_map *map);
39 static struct bpf_map *sock_map_alloc(union bpf_attr *attr) in sock_map_alloc()
70 struct bpf_map *map; in sock_map_get_from_fd()
89 struct bpf_map *map; in sock_map_prog_detach()
133 struct bpf_map *map, void *link_raw) in sock_map_add_link()
151 struct bpf_map *map = link->map; in sock_map_del_link()
217 static int sock_map_link(struct bpf_map *map, struct sock *sk) in sock_map_link()
339 static void sock_map_free(struct bpf_map *map) in sock_map_free()
[all …]
H A Dbpf_sk_storage.c21 bpf_sk_storage_lookup(struct sock *sk, struct bpf_map *map, bool cacheit_lockit) in bpf_sk_storage_lookup()
35 static int bpf_sk_storage_del(struct sock *sk, struct bpf_map *map) in bpf_sk_storage_del()
63 static void bpf_sk_storage_map_free(struct bpf_map *map) in bpf_sk_storage_free()
68 static struct bpf_map *bpf_sk_storage_map_alloc(union bpf_attr *attr) in bpf_sk_storage_map_free()
73 static int notsupp_get_next_key(struct bpf_map *map, void *key, in bpf_sk_storage_map_alloc()
79 static void *bpf_fd_sk_storage_lookup_elem(struct bpf_map *map, void *key) in notsupp_get_next_key()
96 static long bpf_fd_sk_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_sk_storage_lookup_elem()
116 static long bpf_fd_sk_storage_delete_elem(struct bpf_map *map, void *key) in bpf_fd_sk_storage_update_elem()
171 struct bpf_map *map; in bpf_sk_storage_clone()
223 BPF_CALL_5(bpf_sk_storage_get, struct bpf_map *, ma in bpf_sk_storage_clone()
227 BPF_CALL_5(bpf_sk_storage_get,struct bpf_map *,map,struct sock *,sk,void *,value,u64,flags,gfp_t,gfp_flags) BPF_CALL_5() argument
261 BPF_CALL_2(bpf_sk_storage_delete,struct bpf_map *,map,struct sock *,sk) BPF_CALL_2() argument
382 BPF_CALL_5(bpf_sk_storage_get_tracing,struct bpf_map *,map,struct sock *,sk,void *,value,u64,flags,gfp_t,gfp_flags) BPF_CALL_5() argument
393 BPF_CALL_2(bpf_sk_storage_delete_tracing,struct bpf_map *,map,struct sock *,sk) BPF_CALL_2() argument
[all...]
/linux/tools/perf/util/
H A Dbpf_map.h6 struct bpf_map;
10 int bpf_map__fprintf(struct bpf_map *map, FILE *fp);
16 static inline int bpf_map__fprintf(struct bpf_map *map __maybe_unused, FILE *fp __maybe_unused) in bpf_map__fprintf()
/linux/kernel/bpf/preload/iterators/
H A Diterators.bpf.c15 struct bpf_map { struct
23 struct bpf_map *map; argument
76 __s64 bpf_map_sum_elem_count(struct bpf_map *map) __ksym;
83 struct bpf_map *map = ctx->map; in dump_bpf_map()

123456