Home
last modified time | relevance | path

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

123456

/linux/tools/testing/selftests/bpf/progs/
A Dmap_ptr_kern.c30 struct bpf_map { struct
109 struct bpf_map *map = (struct bpf_map *)&m_hash; in check_hash()
145 struct bpf_map *map = (struct bpf_map *)&m_array; in check_array()
177 struct bpf_map *map = (struct bpf_map *)&m_prog_array; in check_prog_array()
285 struct bpf_map *map = (struct bpf_map *)&m_lru_hash; in check_lru_hash()
405 struct bpf_map *map = (struct bpf_map *)&m_devmap; in check_devmap()
426 struct bpf_map *map = (struct bpf_map *)&m_sockmap; in check_sockmap()
447 struct bpf_map *map = (struct bpf_map *)&m_cpumap; in check_cpumap()
468 struct bpf_map *map = (struct bpf_map *)&m_xskmap; in check_xskmap()
571 struct bpf_map *map = (struct bpf_map *)&m_queue; in check_queue()
[all …]
A Dbloom_filter_map.c9 struct bpf_map;
34 struct bpf_map *map;
40 check_elem(struct bpf_map *map, __u32 *key, __u32 *val, in check_elem()
57 struct bpf_map *inner_map; in inner_map()
78 data.map = (struct bpf_map *)&map_bloom; in check_bloom()
A Dbloom_filter_bench.c11 struct bpf_map;
42 struct bpf_map *map;
70 bloom_callback(struct bpf_map *map, __u32 *key, void *val, in bloom_callback()
95 data.map = (struct bpf_map *)&bloom_map; in bloom_lookup()
108 data.map = (struct bpf_map *)&bloom_map; in bloom_update()
/linux/include/linux/
A Dbpf.h32 struct bpf_map;
158 struct bpf_map { struct
163 struct bpf_map *inner_map_meta; argument
267 struct bpf_map map;
296 const struct bpf_map *meta1);
827 struct bpf_map *map;
892 struct bpf_map **used_maps;
951 struct bpf_map *map;
1073 struct bpf_map map;
1405 struct bpf_map * __must_check bpf_map_inc_not_zero(struct bpf_map *map);
[all …]
/linux/tools/lib/bpf/
A Dlibbpf.h391 struct bpf_map;
537 LIBBPF_API struct bpf_map *
547 LIBBPF_API struct bpf_map *
551 struct bpf_map *bpf_map__next(const struct bpf_map *map, const struct bpf_object *obj);
552 LIBBPF_API struct bpf_map *
562 struct bpf_map *bpf_map__prev(const struct bpf_map *map, const struct bpf_object *obj);
563 LIBBPF_API struct bpf_map *
572 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
610 LIBBPF_API void *bpf_map__priv(const struct bpf_map *map);
632 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
[all …]
/linux/kernel/bpf/
A Dqueue_stack_maps.c17 struct bpf_map map;
25 static struct bpf_queue_stack *bpf_queue_stack(struct bpf_map *map) in bpf_queue_stack()
67 static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) in queue_stack_map_alloc()
92 static void queue_stack_map_free(struct bpf_map *map) in queue_stack_map_free()
160 static int queue_map_peek_elem(struct bpf_map *map, void *value) in queue_map_peek_elem()
166 static int stack_map_peek_elem(struct bpf_map *map, void *value) in stack_map_peek_elem()
172 static int queue_map_pop_elem(struct bpf_map *map, void *value) in queue_map_pop_elem()
178 static int stack_map_pop_elem(struct bpf_map *map, void *value) in stack_map_pop_elem()
184 static int queue_stack_map_push_elem(struct bpf_map *map, void *value, in queue_stack_map_push_elem()
231 static int queue_stack_map_update_elem(struct bpf_map *map, void *key, in queue_stack_map_update_elem()
[all …]
A Darraymap.c398 static void array_map_free(struct bpf_map *map) in array_map_free()
504 const struct bpf_map *meta1) in array_map_meta_equal()
513 struct bpf_map *map;
521 struct bpf_map *map = info->map; in bpf_array_map_seq_start()
540 struct bpf_map *map = info->map; in bpf_array_map_seq_next()
560 struct bpf_map *map = info->map; in __bpf_array_map_seq_show()
610 struct bpf_map *map = aux->map; in bpf_iter_init_array_map()
741 static void fd_array_map_free(struct bpf_map *map) in fd_array_map_free()
1065 struct bpf_map *map; in prog_array_map_alloc()
1269 struct bpf_map *map, *inner_map_meta; in array_of_map_alloc()
[all …]
A Dbloom_filter.c15 struct bpf_map map;
43 static int bloom_map_peek_elem(struct bpf_map *map, void *value) in bloom_map_peek_elem()
58 static int bloom_map_push_elem(struct bpf_map *map, void *value, u64 flags) in bloom_map_push_elem()
75 static int bloom_map_pop_elem(struct bpf_map *map, void *value) in bloom_map_pop_elem()
80 static int bloom_map_delete_elem(struct bpf_map *map, void *value) in bloom_map_delete_elem()
85 static struct bpf_map *bloom_map_alloc(union bpf_attr *attr) in bloom_map_alloc()
160 static void bloom_map_free(struct bpf_map *map) in bloom_map_free()
168 static void *bloom_map_lookup_elem(struct bpf_map *map, void *key) in bloom_map_lookup_elem()
174 static int bloom_map_update_elem(struct bpf_map *map, void *key, in bloom_map_update_elem()
181 static int bloom_map_check_btf(const struct bpf_map *map, in bloom_map_check_btf()
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()
72 void bpf_map_meta_free(struct bpf_map *map_meta) in bpf_map_meta_free()
78 bool bpf_map_meta_equal(const struct bpf_map *meta0, in bpf_map_meta_equal()
79 const struct bpf_map *meta1) in bpf_map_meta_equal()
89 void *bpf_map_fd_get_ptr(struct bpf_map *map, in bpf_map_fd_get_ptr()
93 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_fd_get_ptr()
121 return ((struct bpf_map *)ptr)->id; in bpf_map_fd_sys_lookup_elem()
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()
82 BTF_ID(struct, bpf_map)
106 struct bpf_map *map; in bpf_iter_attach_map()
166 struct bpf_map *map, void *key, void *value)
A Dbpf_inode_storage.c36 struct bpf_map *map, in inode_storage_lookup()
103 static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_lookup_elem()
119 static int bpf_fd_inode_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_inode_storage_update_elem()
142 static int inode_storage_delete(struct inode *inode, struct bpf_map *map) in inode_storage_delete()
155 static int bpf_fd_inode_storage_delete_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_delete_elem()
170 BPF_CALL_4(bpf_inode_storage_get, struct bpf_map *, map, struct inode *, inode, in BPF_CALL_4() argument
205 struct bpf_map *, map, struct inode *, inode) in BPF_CALL_2() argument
216 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key()
222 static struct bpf_map *inode_storage_map_alloc(union bpf_attr *attr) in inode_storage_map_alloc()
234 static void inode_storage_map_free(struct bpf_map *map) in inode_storage_map_free()
A Dbpf_task_storage.c56 task_storage_lookup(struct task_struct *task, struct bpf_map *map, in task_storage_lookup()
116 static void *bpf_pid_task_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_pid_task_storage_lookup_elem()
149 static int bpf_pid_task_storage_update_elem(struct bpf_map *map, void *key, in bpf_pid_task_storage_update_elem()
184 static int task_storage_delete(struct task_struct *task, struct bpf_map *map) in task_storage_delete()
197 static int bpf_pid_task_storage_delete_elem(struct bpf_map *map, void *key) in bpf_pid_task_storage_delete_elem()
227 BPF_CALL_4(bpf_task_storage_get, struct bpf_map *, map, struct task_struct *, in BPF_CALL_4() argument
258 BPF_CALL_2(bpf_task_storage_delete, struct bpf_map *, map, struct task_struct *, in BPF_CALL_2() argument
278 static int notsupp_get_next_key(struct bpf_map *map, void *key, void *next_key) in notsupp_get_next_key()
283 static struct bpf_map *task_storage_map_alloc(union bpf_attr *attr) in task_storage_map_alloc()
295 static void task_storage_map_free(struct bpf_map *map) in task_storage_map_free()
A Dlocal_storage.c21 struct bpf_map map;
28 static struct bpf_cgroup_storage_map *map_to_storage(struct bpf_map *map) in map_to_storage()
33 static bool attach_type_isolated(const struct bpf_map *map) in attach_type_isolated()
143 static int 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()
285 static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr) in cgroup_storage_map_alloc()
331 static void cgroup_storage_map_free(struct bpf_map *_map) in cgroup_storage_map_free()
357 static int cgroup_storage_check_btf(const struct bpf_map *map, in cgroup_storage_check_btf()
498 struct bpf_map *map; in bpf_cgroup_storage_alloc()
[all …]
A Dhashtab.c93 struct bpf_map map;
846 struct bpf_map *map = &htab->map; in htab_put_fd_value()
1429 static void htab_map_free_timers(struct bpf_map *map) in htab_map_free_timers()
1442 static void htab_map_free(struct bpf_map *map) in htab_map_free()
1826 htab_map_lookup_and_delete_batch(struct bpf_map *map, in htab_map_lookup_and_delete_batch()
1870 struct bpf_map *map;
1961 struct bpf_map *map = info->map; in __bpf_hash_map_seq_show()
2012 struct bpf_map *map = aux->map; in bpf_iter_init_hash_map()
2302 static void fd_htab_map_free(struct bpf_map *map) in fd_htab_map_free()
2364 struct bpf_map *map, *inner_map_meta; in htab_of_map_alloc()
[all …]
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,
A Dringbuf.c51 struct bpf_map map;
148 static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) in ringbuf_map_alloc()
195 static void ringbuf_map_free(struct bpf_map *map) in ringbuf_map_free()
204 static void *ringbuf_map_lookup_elem(struct bpf_map *map, void *key) in ringbuf_map_lookup_elem()
209 static int ringbuf_map_update_elem(struct bpf_map *map, void *key, void *value, in ringbuf_map_update_elem()
215 static int ringbuf_map_delete_elem(struct bpf_map *map, void *key) in ringbuf_map_delete_elem()
220 static int ringbuf_map_get_next_key(struct bpf_map *map, void *key, in ringbuf_map_get_next_key()
226 static int ringbuf_map_mmap(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap()
253 static __poll_t ringbuf_map_poll(struct bpf_map *map, struct file *filp, in ringbuf_map_poll()
351 BPF_CALL_3(bpf_ringbuf_reserve, struct bpf_map *, map, u64, size, u64, flags) in BPF_CALL_3() argument
[all …]
A Dreuseport_array.c11 struct bpf_map map;
15 static struct reuseport_array *reuseport_array(struct bpf_map *map) in reuseport_array()
52 static void *reuseport_array_lookup_elem(struct bpf_map *map, void *key) in reuseport_array_lookup_elem()
64 static int reuseport_array_delete_elem(struct bpf_map *map, void *key) in reuseport_array_delete_elem()
96 static void reuseport_array_free(struct bpf_map *map) in reuseport_array_free()
151 static struct bpf_map *reuseport_array_alloc(union bpf_attr *attr) in reuseport_array_alloc()
174 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_lookup_elem()
241 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_update_elem()
325 static int reuseport_array_get_next_key(struct bpf_map *map, void *key, in reuseport_array_get_next_key()
A Ddevmap.c75 struct bpf_map map;
157 static struct bpf_map *dev_map_alloc(union bpf_attr *attr) in dev_map_alloc()
182 static void dev_map_free(struct bpf_map *map) in dev_map_free()
266 static void *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_hash_lookup_elem()
280 static int dev_map_hash_get_next_key(struct bpf_map *map, void *key, in dev_map_hash_get_next_key()
428 static void *__dev_map_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_lookup_elem()
590 struct bpf_map *map, bool exclude_ingress) in dev_map_enqueue_multi()
711 struct bpf_prog *xdp_prog, struct bpf_map *map, in dev_map_redirect_multi()
786 static void *dev_map_lookup_elem(struct bpf_map *map, void *key) in dev_map_lookup_elem()
811 static int dev_map_delete_elem(struct bpf_map *map, void *key) in dev_map_delete_elem()
[all …]
A Dsyscall.c110 struct bpf_map *map; in find_and_alloc_map()
477 struct bpf_map *map = container_of(work, struct bpf_map, work); in bpf_map_free_deferred()
834 struct bpf_map *map; in map_create()
977 struct bpf_map *map; in bpf_map_get()
992 struct bpf_map *map; in bpf_map_get_with_uref()
1018 struct bpf_map *bpf_map_inc_not_zero(struct bpf_map *map) in bpf_map_inc_not_zero()
1063 struct bpf_map *map; in map_lookup_elem()
1138 struct bpf_map *map; in map_update_elem()
1198 struct bpf_map *map; in map_delete_elem()
1254 struct bpf_map *map; in map_get_next_key()
[all …]
A Dstackmap.c27 struct bpf_map map;
53 static inline bool stack_map_use_build_id(struct bpf_map *map) in stack_map_use_build_id()
58 static inline int stack_map_data_size(struct bpf_map *map) in stack_map_data_size()
89 static struct bpf_map *stack_map_alloc(union bpf_attr *attr) in stack_map_alloc()
259 static long __bpf_get_stackid(struct bpf_map *map, in __bpf_get_stackid()
383 struct bpf_map *, map, u64, flags) in BPF_CALL_3() argument
615 static void *stack_map_lookup_elem(struct bpf_map *map, void *key) in stack_map_lookup_elem()
621 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy()
644 static int stack_map_get_next_key(struct bpf_map *map, void *key, in stack_map_get_next_key()
680 static int stack_map_delete_elem(struct bpf_map *map, void *key) in stack_map_delete_elem()
[all …]
/linux/tools/perf/include/bpf/
A Dbpf.h11 struct bpf_map { struct
21 #define bpf_map(name, _type, type_key, type_val, _max_entries) \ argument
22 struct bpf_map SEC("maps") name = { \
43 #define pid_map(name, value_type) bpf_map(name, HASH, pid_t, value_type, 64)
45 static int (*bpf_map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags) = (void *…
46 static void *(*bpf_map_lookup_elem)(struct bpf_map *map, void *key) = (void *)BPF_FUNC_map_lookup_e…
68 static int (*perf_event_output)(void *, struct bpf_map *, int, void *, unsigned long) = (void *)BPF…
/linux/net/core/
A Dsock_map.c18 struct bpf_map map;
65 struct bpf_map *map; in sock_map_get_from_fd()
85 struct bpf_map *map; in sock_map_prog_detach()
134 struct bpf_map *map, void *link_raw) in sock_map_add_link()
152 struct bpf_map *map = link->map; in sock_map_del_link()
685 struct bpf_map *map;
692 __bpf_md_ptr(struct bpf_map *, map);
698 struct bpf_map *map, void *key, in DEFINE_BPF_ITER_FUNC()
822 struct bpf_map map;
1269 struct bpf_map *map;
[all …]
A Dbpf_sk_storage.c33 static int bpf_sk_storage_del(struct sock *sk, struct bpf_map *map) in bpf_sk_storage_del()
86 static void bpf_sk_storage_map_free(struct bpf_map *map) in bpf_sk_storage_map_free()
107 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key()
205 struct bpf_map *map; in bpf_sk_storage_clone()
458 struct bpf_map *maps[];
496 const struct bpf_map *map) in diag_check_dup()
532 struct bpf_map *map; in bpf_sk_storage_diag_alloc()
723 struct bpf_map *map;
814 __bpf_md_ptr(struct bpf_map *, map);
820 struct bpf_map *map, struct sock *sk, in DEFINE_BPF_ITER_FUNC()
[all …]
/linux/net/xdp/
A Dxskmap.c59 static struct bpf_map *xsk_map_alloc(union bpf_attr *attr) in xsk_map_alloc()
86 static void xsk_map_free(struct bpf_map *map) in xsk_map_free()
111 static int xsk_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in xsk_map_gen_lookup()
131 static void *__xsk_map_lookup_elem(struct bpf_map *map, u32 key) in __xsk_map_lookup_elem()
141 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key) in xsk_map_lookup_elem()
146 static void *xsk_map_lookup_elem_sys_only(struct bpf_map *map, void *key) in xsk_map_lookup_elem_sys_only()
151 static int xsk_map_update_elem(struct bpf_map *map, void *key, void *value, in xsk_map_update_elem()
212 static int xsk_map_delete_elem(struct bpf_map *map, void *key) in xsk_map_delete_elem()
232 static int xsk_map_redirect(struct bpf_map *map, u32 ifindex, u64 flags) in xsk_map_redirect()
249 static bool xsk_map_meta_equal(const struct bpf_map *meta0, in xsk_map_meta_equal()
[all …]
/linux/tools/perf/util/
A Dbpf_map.h7 struct bpf_map;
11 int bpf_map__fprintf(struct bpf_map *map, FILE *fp);
15 static inline int bpf_map__fprintf(struct bpf_map *map __maybe_unused, FILE *fp __maybe_unused) in bpf_map__fprintf()

Completed in 57 milliseconds

123456