Home
last modified time | relevance | path

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

123

/Linux-v4.19/include/linux/
Dbpf.h23 struct bpf_map;
32 struct bpf_map *(*map_alloc)(union bpf_attr *attr);
33 void (*map_release)(struct bpf_map *map, struct file *map_file);
34 void (*map_free)(struct bpf_map *map);
35 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
36 void (*map_release_uref)(struct bpf_map *map);
39 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
40 int (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
41 int (*map_delete_elem)(struct bpf_map *map, void *key);
44 void *(*map_fd_get_ptr)(struct bpf_map *map, struct file *map_file,
[all …]
Dbpf-cgroup.h15 struct bpf_map;
121 int bpf_cgroup_storage_assign(struct bpf_prog *prog, struct bpf_map *map);
122 void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *map);
270 struct bpf_map *map) { return 0; } in bpf_cgroup_storage_assign()
272 struct bpf_map *map) {} in bpf_cgroup_storage_release()
Dbpf_verifier.h52 struct bpf_map *map_ptr;
193 struct bpf_map *used_maps[MAX_USED_MAPS]; /* array of map's used by eBPF program */
/Linux-v4.19/tools/lib/bpf/
Dlibbpf.h239 struct bpf_map;
240 struct bpf_map *
247 struct bpf_map *
250 struct bpf_map *
251 bpf_map__next(struct bpf_map *map, struct bpf_object *obj);
257 int bpf_map__fd(struct bpf_map *map);
258 const struct bpf_map_def *bpf_map__def(struct bpf_map *map);
259 const char *bpf_map__name(struct bpf_map *map);
260 __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
261 __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
[all …]
Dlibbpf.c169 struct bpf_map { struct
189 struct bpf_map *maps; argument
570 const struct bpf_map *a = _a; in compare_bpf_map()
571 const struct bpf_map *b = _b; in compare_bpf_map()
899 struct bpf_map *maps = obj->maps; in bpf_program__collect_reloc()
986 static int bpf_map_find_btf_info(struct bpf_map *map, const struct btf *btf) in bpf_map_find_btf_info()
1058 int bpf_map__reuse_fd(struct bpf_map *map, int fd) in bpf_map__reuse_fd()
1113 struct bpf_map *map = &obj->maps[i]; in bpf_object__create_maps()
1758 int bpf_map__pin(struct bpf_map *map, const char *path) in bpf_map__pin()
1785 struct bpf_map *map; in bpf_object__pin()
[all …]
/Linux-v4.19/kernel/bpf/
Dmap_in_map.h13 struct bpf_map;
15 struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd);
16 void bpf_map_meta_free(struct bpf_map *map_meta);
17 bool bpf_map_meta_equal(const struct bpf_map *meta0,
18 const struct bpf_map *meta1);
19 void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file,
Dmap_in_map.c12 struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) in bpf_map_meta_alloc()
14 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_meta_alloc()
55 void bpf_map_meta_free(struct bpf_map *map_meta) in bpf_map_meta_free()
60 bool bpf_map_meta_equal(const struct bpf_map *meta0, in bpf_map_meta_equal()
61 const struct bpf_map *meta1) in bpf_map_meta_equal()
71 void *bpf_map_fd_get_ptr(struct bpf_map *map, in bpf_map_fd_get_ptr()
75 struct bpf_map *inner_map; in bpf_map_fd_get_ptr()
102 return ((struct bpf_map *)ptr)->id; in bpf_map_fd_sys_lookup_elem()
Darraymap.c78 static struct bpf_map *array_map_alloc(union bpf_attr *attr) in array_map_alloc()
152 static void *array_map_lookup_elem(struct bpf_map *map, void *key) in array_map_lookup_elem()
164 static u32 array_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in array_map_gen_lookup()
194 static void *percpu_array_map_lookup_elem(struct bpf_map *map, void *key) in percpu_array_map_lookup_elem()
205 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value) in bpf_percpu_array_copy()
232 static int array_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in array_map_get_next_key()
251 static int array_map_update_elem(struct bpf_map *map, void *key, void *value, in array_map_update_elem()
279 int bpf_percpu_array_update(struct bpf_map *map, void *key, void *value, in bpf_percpu_array_update()
318 static int array_map_delete_elem(struct bpf_map *map, void *key) in array_map_delete_elem()
324 static void array_map_free(struct bpf_map *map) in array_map_free()
[all …]
Dxskmap.c13 struct bpf_map map;
18 static struct bpf_map *xsk_map_alloc(union bpf_attr *attr) in xsk_map_alloc()
73 static void xsk_map_free(struct bpf_map *map) in xsk_map_free()
96 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in xsk_map_get_next_key()
113 struct xdp_sock *__xsk_map_lookup_elem(struct bpf_map *map, u32 key) in __xsk_map_lookup_elem()
125 int __xsk_map_redirect(struct bpf_map *map, struct xdp_buff *xdp, in __xsk_map_redirect()
142 void __xsk_map_flush(struct bpf_map *map) in __xsk_map_flush()
155 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key) in xsk_map_lookup_elem()
160 static int xsk_map_update_elem(struct bpf_map *map, void *key, void *value, in xsk_map_update_elem()
202 static int xsk_map_delete_elem(struct bpf_map *map, void *key) in xsk_map_delete_elem()
Dlocal_storage.c18 struct bpf_map map;
26 static struct bpf_cgroup_storage_map *map_to_storage(struct bpf_map *map) in map_to_storage()
112 static void *cgroup_storage_lookup_elem(struct bpf_map *_map, void *_key) in cgroup_storage_lookup_elem()
125 static int cgroup_storage_update_elem(struct bpf_map *map, void *_key, in cgroup_storage_update_elem()
154 static int cgroup_storage_get_next_key(struct bpf_map *_map, void *_key, in cgroup_storage_get_next_key()
190 static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr) in cgroup_storage_map_alloc()
230 static void cgroup_storage_map_free(struct bpf_map *_map) in cgroup_storage_map_free()
240 static int cgroup_storage_delete_elem(struct bpf_map *map, void *key) in cgroup_storage_delete_elem()
255 int bpf_cgroup_storage_assign(struct bpf_prog *prog, struct bpf_map *_map) in bpf_cgroup_storage_assign()
276 void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *_map) in bpf_cgroup_storage_release()
[all …]
Dhashtab.c34 struct bpf_map map;
98 static void *fd_htab_map_get_ptr(const struct bpf_map *map, struct htab_elem *l) in fd_htab_map_get_ptr()
298 static struct bpf_map *htab_map_alloc(union bpf_attr *attr) in htab_map_alloc()
464 static void *__htab_map_lookup_elem(struct bpf_map *map, void *key) in __htab_map_lookup_elem()
485 static void *htab_map_lookup_elem(struct bpf_map *map, void *key) in htab_map_lookup_elem()
506 static u32 htab_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in htab_map_gen_lookup()
512 (void *(*)(struct bpf_map *map, void *key))NULL)); in htab_map_gen_lookup()
521 static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key) in htab_lru_map_lookup_elem()
533 static u32 htab_lru_map_gen_lookup(struct bpf_map *map, in htab_lru_map_gen_lookup()
541 (void *(*)(struct bpf_map *map, void *key))NULL)); in htab_lru_map_gen_lookup()
[all …]
Dreuseport_array.c11 struct bpf_map map;
15 static struct reuseport_array *reuseport_array(struct bpf_map *map) in reuseport_array()
49 static void *reuseport_array_lookup_elem(struct bpf_map *map, void *key) in reuseport_array_lookup_elem()
61 static int reuseport_array_delete_elem(struct bpf_map *map, void *key) in reuseport_array_delete_elem()
93 static void reuseport_array_free(struct bpf_map *map) in reuseport_array_free()
150 static struct bpf_map *reuseport_array_alloc(union bpf_attr *attr) in reuseport_array_alloc()
184 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_lookup_elem()
251 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, in bpf_fd_reuseport_array_update_elem()
337 static int reuseport_array_get_next_key(struct bpf_map *map, void *key, in reuseport_array_get_next_key()
Dcpumap.c65 struct bpf_map map;
79 static struct bpf_map *cpu_map_alloc(union bpf_attr *attr) in cpu_map_alloc()
417 static int cpu_map_delete_elem(struct bpf_map *map, void *key) in cpu_map_delete_elem()
430 static int cpu_map_update_elem(struct bpf_map *map, void *key, void *value, in cpu_map_update_elem()
468 static void cpu_map_free(struct bpf_map *map) in cpu_map_free()
516 struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) in __cpu_map_lookup_elem()
528 static void *cpu_map_lookup_elem(struct bpf_map *map, void *key) in cpu_map_lookup_elem()
536 static int cpu_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in cpu_map_get_next_key()
638 void __cpu_map_insert_ctx(struct bpf_map *map, u32 bit) in __cpu_map_insert_ctx()
646 void __cpu_map_flush(struct bpf_map *map) in __cpu_map_flush()
Ddevmap.c74 struct bpf_map map;
88 static struct bpf_map *dev_map_alloc(union bpf_attr *attr) in dev_map_alloc()
147 static void dev_map_free(struct bpf_map *map) in dev_map_free()
195 static int dev_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in dev_map_get_next_key()
212 void __dev_map_insert_ctx(struct bpf_map *map, u32 bit) in __dev_map_insert_ctx()
275 void __dev_map_flush(struct bpf_map *map) in __dev_map_flush()
302 struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key) in __dev_map_lookup_elem()
372 static void *dev_map_lookup_elem(struct bpf_map *map, void *key) in dev_map_lookup_elem()
409 static int dev_map_delete_elem(struct bpf_map *map, void *key) in dev_map_delete_elem()
432 static int dev_map_update_elem(struct bpf_map *map, void *key, void *value, in dev_map_update_elem()
Dsyscall.c109 static struct bpf_map *find_and_alloc_map(union bpf_attr *attr) in find_and_alloc_map()
113 struct bpf_map *map; in find_and_alloc_map()
162 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr) in bpf_map_init_from_attr()
201 static int bpf_map_init_memlock(struct bpf_map *map) in bpf_map_init_memlock()
215 static void bpf_map_release_memlock(struct bpf_map *map) in bpf_map_release_memlock()
222 int bpf_map_charge_memlock(struct bpf_map *map, u32 pages) in bpf_map_charge_memlock()
233 void bpf_map_uncharge_memlock(struct bpf_map *map, u32 pages) in bpf_map_uncharge_memlock()
239 static int bpf_map_alloc_id(struct bpf_map *map) in bpf_map_alloc_id()
257 void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock) in bpf_map_free_id()
286 struct bpf_map *map = container_of(work, struct bpf_map, work); in bpf_map_free_deferred()
[all …]
Dhelpers.c31 BPF_CALL_2(bpf_map_lookup_elem, struct bpf_map *, map, void *, key) in BPF_CALL_2() argument
46 BPF_CALL_4(bpf_map_update_elem, struct bpf_map *, map, void *, key, in BPF_CALL_4() argument
64 BPF_CALL_2(bpf_map_delete_elem, struct bpf_map *, map, void *, key) in BPF_CALL_2() argument
199 BPF_CALL_2(bpf_get_local_storage, struct bpf_map *, map, u64, flags) in BPF_CALL_2() argument
Dstackmap.c29 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()
88 static struct bpf_map *stack_map_alloc(union bpf_attr *attr) in stack_map_alloc()
338 BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map, in BPF_CALL_3() argument
506 static void *stack_map_lookup_elem(struct bpf_map *map, void *key) in stack_map_lookup_elem()
512 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value) in bpf_stackmap_copy()
535 static int stack_map_get_next_key(struct bpf_map *map, void *key, in stack_map_get_next_key()
564 static int stack_map_update_elem(struct bpf_map *map, void *key, void *value, in stack_map_update_elem()
571 static int stack_map_delete_elem(struct bpf_map *map, void *key) in stack_map_delete_elem()
[all …]
Dlpm_trie.c35 struct bpf_map map;
191 static void *trie_lookup_elem(struct bpf_map *map, void *_key) in trie_lookup_elem()
264 static int trie_update_elem(struct bpf_map *map, in trie_update_elem()
395 static int trie_delete_elem(struct bpf_map *map, void *_key) in trie_delete_elem()
503 static struct bpf_map *trie_alloc(union bpf_attr *attr) in trie_alloc()
554 static void trie_free(struct bpf_map *map) in trie_free()
598 static int trie_get_next_key(struct bpf_map *map, void *_key, void *_next_key) in trie_get_next_key()
691 static int trie_check_btf(const struct bpf_map *map, in trie_check_btf()
Doffload.c330 struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr) in bpf_map_offload_map_alloc()
388 void bpf_map_offload_map_free(struct bpf_map *map) in bpf_map_offload_map_free()
402 int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value) in bpf_map_offload_lookup_elem()
415 int bpf_map_offload_update_elem(struct bpf_map *map, in bpf_map_offload_update_elem()
433 int bpf_map_offload_delete_elem(struct bpf_map *map, void *key) in bpf_map_offload_delete_elem()
446 int bpf_map_offload_get_next_key(struct bpf_map *map, void *key, void *next_key) in bpf_map_offload_get_next_key()
489 int bpf_map_offload_info_fill(struct bpf_map_info *info, struct bpf_map *map) in bpf_map_offload_info_fill()
547 bool bpf_offload_prog_map_match(struct bpf_prog *prog, struct bpf_map *map) in bpf_offload_prog_map_match()
Dsockmap.c58 struct bpf_map map;
70 struct bpf_map map;
93 struct bpf_map *map;
1657 static struct bpf_map *sock_map_alloc(union bpf_attr *attr) in sock_map_alloc()
1740 static void sock_map_free(struct bpf_map *map) in sock_map_free()
1781 static int sock_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in sock_map_get_next_key()
1799 struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) in __sock_map_lookup_elem()
1809 static int sock_map_delete_elem(struct bpf_map *map, void *key) in sock_map_delete_elem()
1868 static int __sock_map_ctx_update_elem(struct bpf_map *map, in __sock_map_ctx_update_elem()
1985 struct bpf_map *map, in sock_map_ctx_update_elem()
[all …]
Dinode.c163 static struct bpf_map *seq_file_to_map(struct seq_file *m) in seq_file_to_map()
176 static struct map_iter *map_iter_alloc(struct bpf_map *map) in map_iter_alloc()
197 struct bpf_map *map = seq_file_to_map(m); in map_seq_next()
232 struct bpf_map *map = seq_file_to_map(m); in map_seq_show()
254 struct bpf_map *map = inode->i_private; in bpffs_map_open()
334 struct bpf_map *map = arg; in bpf_mkmap()
/Linux-v4.19/tools/perf/include/bpf/
Dstdio.h5 struct bpf_map SEC("maps") __bpf_stdout__ = {
12 static int (*perf_event_output)(void *, struct bpf_map *, int, void *, unsigned long) =
/Linux-v4.19/include/trace/events/
Dxdp.h58 const struct bpf_map *map, u32 map_index),
93 const struct bpf_map *map, u32 map_index),
101 const struct bpf_map *map, u32 map_index),
115 const struct bpf_map *map, u32 map_index),
130 const struct bpf_map *map, u32 map_index),
233 TP_PROTO(const struct bpf_map *map, u32 map_index,
/Linux-v4.19/tools/perf/util/
Dbpf-loader.c862 bpf_map_priv__clear(struct bpf_map *map __maybe_unused, in bpf_map_priv__clear()
967 bpf_map__add_op(struct bpf_map *map, struct bpf_map_op *op) in bpf_map__add_op()
996 bpf_map__add_newop(struct bpf_map *map, struct parse_events_term *term) in bpf_map__add_newop()
1014 __bpf_map__config_value(struct bpf_map *map, in __bpf_map__config_value()
1056 bpf_map__config_value(struct bpf_map *map, in bpf_map__config_value()
1074 __bpf_map__config_event(struct bpf_map *map, in __bpf_map__config_event()
1116 bpf_map__config_event(struct bpf_map *map, in bpf_map__config_event()
1135 int (*config_func)(struct bpf_map *, struct parse_events_term *,
1146 struct bpf_map *map, in config_map_indices_range_check()
1189 struct bpf_map *map; in bpf__obj_config_map()
[all …]
/Linux-v4.19/kernel/trace/
Dbpf_trace.c294 get_map_perf_counter(struct bpf_map *map, u64 flags, in get_map_perf_counter()
316 BPF_CALL_2(bpf_perf_event_read, struct bpf_map *, map, u64, flags) in BPF_CALL_2() argument
339 BPF_CALL_4(bpf_perf_event_read_value, struct bpf_map *, map, u64, flags, in BPF_CALL_4() argument
369 __bpf_perf_event_output(struct pt_regs *regs, struct bpf_map *map, in __bpf_perf_event_output()
399 BPF_CALL_5(bpf_perf_event_output, struct pt_regs *, regs, struct bpf_map *, map, in BPF_CALL_5() argument
433 u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size, in bpf_event_output()
471 BPF_CALL_2(bpf_current_task_under_cgroup, struct bpf_map *, map, u32, idx) in BPF_CALL_2() argument
623 BPF_CALL_5(bpf_perf_event_output_tp, void *, tp_buff, struct bpf_map *, map, in BPF_CALL_5() argument
647 BPF_CALL_3(bpf_get_stackid_tp, void *, tp_buff, struct bpf_map *, map, in BPF_CALL_3() argument
777 struct bpf_map *, map, u64, flags, void *, data, u64, size) in BPF_CALL_5() argument
[all …]

123