Home
last modified time | relevance | path

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

1234567

/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dmap_ptr_kern.c30 struct bpf_map { struct
111 struct bpf_map *map = (struct bpf_map *)&m_hash; in check_hash()
150 struct bpf_map *map = (struct bpf_map *)&m_array; in check_array()
290 struct bpf_map *map = (struct bpf_map *)&m_lru_hash; in check_lru_hash()
334 struct bpf_map *map = (struct bpf_map *)&m_lpm_trie; in check_lpm_trie()
422 struct bpf_map *map = (struct bpf_map *)&m_devmap; in check_devmap()
443 struct bpf_map *map = (struct bpf_map *)&m_sockmap; in check_sockmap()
464 struct bpf_map *map = (struct bpf_map *)&m_cpumap; in check_cpumap()
485 struct bpf_map *map = (struct bpf_map *)&m_xskmap; in check_xskmap()
588 struct bpf_map *map = (struct bpf_map *)&m_queue; in check_queue()
[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()
/linux-6.15/tools/lib/bpf/
H A Dlibbpf.h880 struct bpf_map;
966 LIBBPF_API struct bpf_map *
972 LIBBPF_API struct bpf_map *
981 LIBBPF_API struct bpf_map *
1029 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
1030 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
1046 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
1069 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
1141 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
1715 struct bpf_map **map;
[all …]
/linux-6.15/include/linux/
H A Dbpf.h40 struct bpf_map;
263 struct bpf_map { struct
265 struct bpf_map *inner_map_meta; argument
596 struct bpf_map map;
1494 struct bpf_map *map;
1581 struct bpf_map **used_maps;
1669 struct bpf_map *map;
1998 struct bpf_map map;
2367 struct bpf_map *__bpf_map_inc_not_zero(struct bpf_map *map, bool uref);
2368 struct bpf_map * __must_check bpf_map_inc_not_zero(struct bpf_map *map);
[all …]
H A Dbpf_local_storage.h48 struct bpf_map map;
133 struct bpf_map *
171 void bpf_local_storage_map_free(struct bpf_map *map,
175 int bpf_local_storage_map_check_btf(const struct bpf_map *map,
206 u64 bpf_local_storage_map_mem_usage(const struct bpf_map *map);
/linux-6.15/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()
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()
182 static long queue_stack_map_push_elem(struct bpf_map *map, void *value, in queue_stack_map_push_elem()
230 static long queue_stack_map_update_elem(struct bpf_map *map, void *key, in queue_stack_map_update_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 Darraymap.c453 static void array_map_free(struct bpf_map *map) in array_map_free()
577 const struct bpf_map *meta1) in array_map_meta_equal()
586 struct bpf_map *map;
594 struct bpf_map *map = info->map; in bpf_array_map_seq_start()
613 struct bpf_map *map = info->map; in bpf_array_map_seq_next()
633 struct bpf_map *map = info->map; in __bpf_array_map_seq_show()
684 struct bpf_map *map = aux->map; in bpf_iter_init_array_map()
843 static void fd_array_map_free(struct bpf_map *map) in fd_array_map_free()
1156 struct bpf_map *map; in prog_array_map_alloc()
1357 struct bpf_map *map, *inner_map_meta; in array_of_map_alloc()
[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()
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()
183 static int bloom_map_check_btf(const struct bpf_map *map, in bloom_map_check_btf()
[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 Dbpf_inode_storage.c36 struct bpf_map *map, in inode_storage_lookup()
78 static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_lookup_elem()
90 static long bpf_fd_inode_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_inode_storage_update_elem()
107 static int inode_storage_delete(struct inode *inode, struct bpf_map *map) in inode_storage_delete()
120 static long bpf_fd_inode_storage_delete_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_delete_elem()
130 BPF_CALL_5(bpf_inode_storage_get, struct bpf_map *, map, struct inode *, inode, in BPF_CALL_5() argument
166 struct bpf_map *, map, struct inode *, inode) in BPF_CALL_2() argument
178 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key()
184 static struct bpf_map *inode_storage_map_alloc(union bpf_attr *attr) in inode_storage_map_alloc()
189 static void inode_storage_map_free(struct bpf_map *map) in inode_storage_map_free()
H A Dbpf_task_storage.c54 task_storage_lookup(struct task_struct *task, struct bpf_map *map, in task_storage_lookup()
88 static void *bpf_pid_task_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_pid_task_storage_lookup_elem()
121 static long bpf_pid_task_storage_update_elem(struct bpf_map *map, void *key, in bpf_pid_task_storage_update_elem()
160 static int task_storage_delete(struct task_struct *task, struct bpf_map *map, in task_storage_delete()
177 static long bpf_pid_task_storage_delete_elem(struct bpf_map *map, void *key) in bpf_pid_task_storage_delete_elem()
208 static void *__bpf_task_storage_get(struct bpf_map *map, in __bpf_task_storage_get()
250 BPF_CALL_5(bpf_task_storage_get, struct bpf_map *, map, struct task_struct *, in BPF_CALL_5() argument
287 BPF_CALL_2(bpf_task_storage_delete, struct bpf_map *, map, struct task_struct *, in BPF_CALL_2() argument
306 static int notsupp_get_next_key(struct bpf_map *map, void *key, void *next_key) in notsupp_get_next_key()
311 static struct bpf_map *task_storage_map_alloc(union bpf_attr *attr) in task_storage_map_alloc()
[all …]
H A Dbpf_cgrp_storage.c63 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit) in cgroup_storage_lookup()
77 static void *bpf_cgrp_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_cgrp_storage_lookup_elem()
95 static long bpf_cgrp_storage_update_elem(struct bpf_map *map, void *key, in bpf_cgrp_storage_update_elem()
115 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map) in cgroup_storage_delete()
127 static long bpf_cgrp_storage_delete_elem(struct bpf_map *map, void *key) in bpf_cgrp_storage_delete_elem()
144 static int notsupp_get_next_key(struct bpf_map *map, void *key, void *next_key) in notsupp_get_next_key()
149 static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr) in cgroup_storage_map_alloc()
154 static void cgroup_storage_map_free(struct bpf_map *map) in cgroup_storage_map_free()
160 BPF_CALL_5(bpf_cgrp_storage_get, struct bpf_map *, map, struct cgroup *, cgroup, in BPF_CALL_5() argument
191 BPF_CALL_2(bpf_cgrp_storage_delete, struct bpf_map *, map, struct cgroup *, cgroup) in BPF_CALL_2() argument
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()
75 static long arena_map_pop_elem(struct bpf_map *map, void *value) in arena_map_pop_elem()
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()
217 static u64 arena_map_mem_usage(const struct bpf_map *map) in arena_map_mem_usage()
251 struct bpf_map *map = vma->vm_file->private_data; in arena_vm_close()
266 struct bpf_map *map = vmf->vma->vm_file->private_data; in arena_vm_fault()
318 struct bpf_map *map = filp->private_data; in arena_get_unmapped_area()
558 struct bpf_map *map = p__map; in bpf_arena_alloc_pages()
[all …]
H A Dlocal_storage.c22 struct bpf_map map;
29 static struct bpf_cgroup_storage_map *map_to_storage(struct bpf_map *map) in map_to_storage()
34 static bool attach_type_isolated(const struct bpf_map *map) in attach_type_isolated()
144 static long cgroup_storage_update_elem(struct bpf_map *map, void *key, in cgroup_storage_update_elem()
182 int bpf_percpu_cgroup_storage_copy(struct bpf_map *_map, void *key, in bpf_percpu_cgroup_storage_copy()
211 int bpf_percpu_cgroup_storage_update(struct bpf_map *_map, void *key, in bpf_percpu_cgroup_storage_update()
330 static void cgroup_storage_map_free(struct bpf_map *_map) in cgroup_storage_map_free()
356 static int cgroup_storage_check_btf(const struct bpf_map *map, in cgroup_storage_check_btf()
449 static u64 cgroup_storage_map_usage(const struct bpf_map *map) in cgroup_storage_map_usage()
504 struct bpf_map *map; in bpf_cgroup_storage_alloc()
[all …]
H A Dhashtab.c89 struct bpf_map map;
877 struct bpf_map *map = &htab->map; in htab_put_fd_value()
1527 static void htab_map_free(struct bpf_map *map) in htab_map_free()
1817 struct bpf_map **inner_map = value; in __htab_map_lookup_and_delete_batch()
1933 htab_map_lookup_and_delete_batch(struct bpf_map *map, in htab_map_lookup_and_delete_batch()
1977 struct bpf_map *map;
2068 struct bpf_map *map = info->map; in __bpf_hash_map_seq_show()
2119 struct bpf_map *map = aux->map; in bpf_iter_init_hash_map()
2498 static void fd_htab_map_free(struct bpf_map *map) in fd_htab_map_free()
2566 struct bpf_map *map, *inner_map_meta; in htab_of_map_alloc()
[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.c80 struct bpf_map map;
190 static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) in ringbuf_map_alloc()
231 static void ringbuf_map_free(struct bpf_map *map) in ringbuf_map_free()
240 static void *ringbuf_map_lookup_elem(struct bpf_map *map, void *key) in ringbuf_map_lookup_elem()
251 static long ringbuf_map_delete_elem(struct bpf_map *map, void *key) in ringbuf_map_delete_elem()
256 static int ringbuf_map_get_next_key(struct bpf_map *map, void *key, in ringbuf_map_get_next_key()
310 static __poll_t ringbuf_map_poll_kern(struct bpf_map *map, struct file *filp, in ringbuf_map_poll_kern()
323 static __poll_t ringbuf_map_poll_user(struct bpf_map *map, struct file *filp, in ringbuf_map_poll_user()
336 static u64 ringbuf_map_mem_usage(const struct bpf_map *map) in ringbuf_map_mem_usage()
564 BPF_CALL_2(bpf_ringbuf_query, struct bpf_map *, map, u64, flags) in BPF_CALL_2() argument
[all …]
/linux-6.15/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()
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()
222 static long xsk_map_delete_elem(struct bpf_map *map, void *key) in xsk_map_delete_elem()
242 static long xsk_map_redirect(struct bpf_map *map, u64 index, u64 flags) in xsk_map_redirect()
259 static bool xsk_map_meta_equal(const struct bpf_map *meta0, in xsk_map_meta_equal()
[all …]
/linux-6.15/net/core/
H A Dsock_map.c18 struct bpf_map map;
70 struct bpf_map *map; in sock_map_get_from_fd()
89 struct bpf_map *map; in sock_map_prog_detach()
151 struct bpf_map *map = link->map; in sock_map_del_link()
705 struct bpf_map *map;
859 struct bpf_map map;
1311 struct bpf_map *map;
1562 struct bpf_map *map; in sock_map_bpf_prog_query()
1711 struct bpf_map *map;
1848 struct bpf_map *map; in sock_map_link_create()
[all …]
H A Dbpf_sk_storage.c35 static int bpf_sk_storage_del(struct sock *sk, struct bpf_map *map) in bpf_sk_storage_del()
65 static void bpf_sk_storage_map_free(struct bpf_map *map) in bpf_sk_storage_map_free()
75 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key()
174 struct bpf_map *map; in bpf_sk_storage_clone()
427 struct bpf_map *maps[];
465 const struct bpf_map *map) in diag_check_dup()
505 struct bpf_map *map = bpf_map_get(map_fd); in bpf_sk_storage_diag_alloc()
690 struct bpf_map *map;
781 __bpf_md_ptr(struct bpf_map *, map);
787 struct bpf_map *map, struct sock *sk, in DEFINE_BPF_ITER_FUNC()
[all …]
/linux-6.15/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()

1234567