/linux-master/kernel/bpf/ |
H A D | map_in_map.h | 10 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 D | queue_stack_maps.c | 17 struct bpf_map map; 25 static struct bpf_queue_stack *bpf_queue_stack(struct bpf_map *map) 64 static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) 87 static void queue_stack_map_free(struct bpf_map *map) 94 static long __queue_map_get(struct bpf_map *map, void *value, bool delete) 128 static long __stack_map_get(struct bpf_map *map, void *value, bool delete) 165 static long queue_map_peek_elem(struct bpf_map *map, void *value) 171 static long stack_map_peek_elem(struct bpf_map *map, void *value) 177 static long queue_map_pop_elem(struct bpf_map *map, void *value) 183 static long stack_map_pop_elem(struct bpf_map *ma [all...] |
H A D | map_in_map.c | 10 struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) 12 struct bpf_map *inner_map, *inner_map_meta; 90 void bpf_map_meta_free(struct bpf_map *map_meta) 97 bool bpf_map_meta_equal(const struct bpf_map *meta0, 98 const struct bpf_map *meta1) 108 void *bpf_map_fd_get_ptr(struct bpf_map *map, 112 struct bpf_map *inner_map, *inner_map_meta; 130 void bpf_map_fd_put_ptr(struct bpf_map *map, void *ptr, bool need_defer) 132 struct bpf_map *inner_map = ptr; 149 return ((struct bpf_map *)pt [all...] |
H A D | bloom_filter.c | 16 struct bpf_map map; 36 static long bloom_map_peek_elem(struct bpf_map *map, void *value) 51 static long bloom_map_push_elem(struct bpf_map *map, void *value, u64 flags) 68 static long bloom_map_pop_elem(struct bpf_map *map, void *value) 73 static long bloom_map_delete_elem(struct bpf_map *map, void *value) 78 static int bloom_map_get_next_key(struct bpf_map *map, void *key, void *next_key) 95 static struct bpf_map *bloom_map_alloc(union bpf_attr *attr) 162 static void bloom_map_free(struct bpf_map *map) 170 static void *bloom_map_lookup_elem(struct bpf_map *map, void *key) 176 static long bloom_map_update_elem(struct bpf_map *ma [all...] |
H A D | arraymap.c | 80 static struct bpf_map *array_map_alloc(union bpf_attr *attr) 163 static void *array_map_lookup_elem(struct bpf_map *map, void *key) 174 static int array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, 188 static int array_map_direct_value_meta(const struct bpf_map *map, u64 imm, 205 static int array_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) 238 static void *percpu_array_map_lookup_elem(struct bpf_map *map, void *key) 249 static void *percpu_array_map_lookup_percpu_elem(struct bpf_map *map, void *key, u32 cpu) 263 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value) 291 static int array_map_get_next_key(struct bpf_map *map, void *key, void *next_key) 310 static long array_map_update_elem(struct bpf_map *ma [all...] |
H A D | bpf_inode_storage.c | 37 struct bpf_map *map, 78 static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key) 91 static long bpf_fd_inode_storage_update_elem(struct bpf_map *map, void *key, 111 static int inode_storage_delete(struct inode *inode, struct bpf_map *map) 124 static long bpf_fd_inode_storage_delete_elem(struct bpf_map *map, void *key) 138 BPF_CALL_5(bpf_inode_storage_get, struct bpf_map *, map, struct inode *, inode, 174 struct bpf_map *, map, struct inode *, inode) 186 static int notsupp_get_next_key(struct bpf_map *map, void *key, 192 static struct bpf_map *inode_storage_map_alloc(union bpf_attr *attr) 197 static void inode_storage_map_free(struct bpf_map *ma [all...] |
H A D | reuseport_array.c | 12 struct bpf_map map; 16 static struct reuseport_array *reuseport_array(struct bpf_map *map) 50 static void *reuseport_array_lookup_elem(struct bpf_map *map, void *key) 62 static long reuseport_array_delete_elem(struct bpf_map *map, void *key) 94 static void reuseport_array_free(struct bpf_map *map) 149 static struct bpf_map *reuseport_array_alloc(union bpf_attr *attr) 165 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key, 232 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key, 316 static int reuseport_array_get_next_key(struct bpf_map *map, void *key, 335 static u64 reuseport_array_mem_usage(const struct bpf_map *ma [all...] |
H A D | bpf_cgrp_storage.c | 64 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit) 78 static void *bpf_cgrp_storage_lookup_elem(struct bpf_map *map, void *key) 96 static long bpf_cgrp_storage_update_elem(struct bpf_map *map, void *key, 116 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map) 128 static long bpf_cgrp_storage_delete_elem(struct bpf_map *map, void *key) 145 static int notsupp_get_next_key(struct bpf_map *map, void *key, void *next_key) 150 static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr) 155 static void cgroup_storage_map_free(struct bpf_map *map) 161 BPF_CALL_5(bpf_cgrp_storage_get, struct bpf_map *, map, struct cgroup *, cgroup, 191 BPF_CALL_2(bpf_cgrp_storage_delete, struct bpf_map *, ma [all...] |
H A D | map_iter.c | 16 struct bpf_map *map; 33 bpf_map_put((struct bpf_map *)v); 39 __bpf_md_ptr(struct bpf_map *, map); 42 DEFINE_BPF_ITER_FUNC(bpf_map, struct bpf_iter_meta *meta, struct bpf_map *map) 71 bpf_map_put((struct bpf_map *)v); 81 BTF_ID_LIST_GLOBAL_SINGLE(btf_bpf_map_id, struct, bpf_map) 91 .target = "bpf_map", 105 struct bpf_map *map; 165 struct bpf_map *ma [all...] |
H A D | bpf_task_storage.c | 57 task_storage_lookup(struct task_struct *task, struct bpf_map *map, 90 static void *bpf_pid_task_storage_lookup_elem(struct bpf_map *map, void *key) 123 static long bpf_pid_task_storage_update_elem(struct bpf_map *map, void *key, 159 static int task_storage_delete(struct task_struct *task, struct bpf_map *map, 176 static long bpf_pid_task_storage_delete_elem(struct bpf_map *map, void *key) 207 static void *__bpf_task_storage_get(struct bpf_map *map, 230 BPF_CALL_5(bpf_task_storage_get_recur, struct bpf_map *, map, struct task_struct *, 249 BPF_CALL_5(bpf_task_storage_get, struct bpf_map *, map, struct task_struct *, 265 BPF_CALL_2(bpf_task_storage_delete_recur, struct bpf_map *, map, struct task_struct *, 286 BPF_CALL_2(bpf_task_storage_delete, struct bpf_map *, ma [all...] |
/linux-master/tools/perf/util/ |
H A D | bpf_map.h | 6 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)
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | map_ptr_kern.c | 30 struct bpf_map { struct 38 static inline int check_bpf_map_fields(struct bpf_map *map, __u32 key_size, 50 static inline int check_bpf_map_ptr(struct bpf_map *indirect, 51 struct bpf_map *direct) 62 static inline int check(struct bpf_map *indirect, struct bpf_map *direct, 71 static inline int check_default(struct bpf_map *indirect, 72 struct bpf_map *direct) 80 check_default_noinline(struct bpf_map *indirect, struct bpf_map *direc [all...] |
H A D | jeq_infer_not_null_fail.c | 20 struct bpf_map *map = (struct bpf_map *)&m_hash; 21 struct bpf_map *inner_map = map->inner_map_meta;
|
H A D | test_libbpf_get_fd_by_id_opts.c | 26 SEC("lsm/bpf_map") 27 int BPF_PROG(check_access, struct bpf_map *map, fmode_t fmode) 29 if (map != (struct bpf_map *)&data_input)
|
H A D | map_percpu_stats.c | 10 __s64 bpf_map_sum_elem_count(struct bpf_map *map) __ksym; 12 SEC("iter/bpf_map") 16 struct bpf_map *map = ctx->map;
|
H A D | bloom_filter_map.c | 10 struct bpf_map; 35 struct bpf_map *map; 41 check_elem(struct bpf_map *map, __u32 *key, __u32 *val, 58 struct bpf_map *inner_map; 79 data.map = (struct bpf_map *)&map_bloom;
|
H A D | bpf_iter_bpf_map.c | 8 SEC("iter/bpf_map") 13 struct bpf_map *map = ctx->map;
|
H A D | for_each_map_elem_write_key.c | 13 check_array_elem(struct bpf_map *map, __u32 *key, __u64 *val,
|
H A D | for_each_array_map_elem.c | 29 unused_subprog(struct bpf_map *map, __u32 *key, __u64 *val, 37 check_array_elem(struct bpf_map *map, __u32 *key, __u64 *val, 50 check_percpu_elem(struct bpf_map *map, __u32 *key, __u64 *val,
|
H A D | bloom_filter_bench.c | 12 struct bpf_map; 43 struct bpf_map *map; 71 bloom_callback(struct bpf_map *map, __u32 *key, void *val, 96 data.map = (struct bpf_map *)&bloom_map; 109 data.map = (struct bpf_map *)&bloom_map;
|
H A D | test_bpf_ma.c | 60 static __always_inline void batch_alloc(struct bpf_map *map, unsigned int batch, unsigned int idx) 87 static __always_inline void batch_free(struct bpf_map *map, unsigned int batch, unsigned int idx) 109 static __always_inline void batch_percpu_alloc(struct bpf_map *map, unsigned int batch, 137 static __always_inline void batch_percpu_free(struct bpf_map *map, unsigned int batch, 159 batch_alloc((struct bpf_map *)(&array_##size), batch, idx) 163 batch_alloc((struct bpf_map *)(&array_##size), batch, idx); \ 164 batch_free((struct bpf_map *)(&array_##size), batch, idx); \ 168 batch_percpu_alloc((struct bpf_map *)(&array_percpu_##size), batch, idx) 172 batch_percpu_alloc((struct bpf_map *)(&array_percpu_##size), batch, idx); \ 173 batch_percpu_free((struct bpf_map *)( [all...] |
/linux-master/include/linux/ |
H A D | bpf.h | 39 struct bpf_map; 84 struct bpf_map *(*map_alloc)(union bpf_attr *attr); 85 void (*map_release)(struct bpf_map *map, struct file *map_file); 86 void (*map_free)(struct bpf_map *map); 87 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key); 88 void (*map_release_uref)(struct bpf_map *map); 89 void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key); 90 int (*map_lookup_batch)(struct bpf_map *map, const union bpf_attr *attr, 92 int (*map_lookup_and_delete_elem)(struct bpf_map *map, void *key, 94 int (*map_lookup_and_delete_batch)(struct bpf_map *ma 257 struct bpf_map { struct [all...] |
/linux-master/tools/lib/bpf/ |
H A D | libbpf_legacy.h | 124 struct bpf_map; 132 LIBBPF_API const char *bpf_map__get_pin_path(const struct bpf_map *map);
|
H A D | libbpf.h | 837 struct bpf_map; 839 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map); 840 LIBBPF_API int bpf_link__update_map(struct bpf_link *link, const struct bpf_map *map); 923 LIBBPF_API struct bpf_map * 929 LIBBPF_API struct bpf_map * 930 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *map); 938 LIBBPF_API struct bpf_map * 939 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *map); 960 LIBBPF_API int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate); 961 LIBBPF_API bool bpf_map__autocreate(const struct bpf_map *ma [all...] |
/linux-master/net/xdp/ |
H A D | xskmap.c | 64 static struct bpf_map *xsk_map_alloc(union bpf_attr *attr) 88 static u64 xsk_map_mem_usage(const struct bpf_map *map) 96 static void xsk_map_free(struct bpf_map *map) 104 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key) 121 static int xsk_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) 141 static void *__xsk_map_lookup_elem(struct bpf_map *map, u32 key) 151 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key) 156 static void *xsk_map_lookup_elem_sys_only(struct bpf_map *map, void *key) 161 static long xsk_map_update_elem(struct bpf_map *map, void *key, void *value, 222 static long xsk_map_delete_elem(struct bpf_map *ma [all...] |