| /linux/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, 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 *direc 31 map_typebpf_map global() argument [all...] |
| H A D | test_bpf_ma.c | 56 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 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, 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 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, 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 D | timer_mim_reject.c | 50 struct bpf_map *inner_map, *inner_map2; in BPF_PROG() 89 struct bpf_map *inner_map2; in timer_mismatch_cb() 108 struct bpf_map *inner_map2; in timer_match_cb() 122 struct bpf_map *inner_map; in BPF_PROG() 142 struct bpf_map *inner_map; in BPF_PROG()
|
| H A D | jeq_infer_not_null_fail.c | 24 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()
|
| /linux/include/linux/ |
| H A D | bpf.h | 45 struct bpf_map; 90 struct bpf_map *(*map_alloc)(union bpf_attr *attr); 91 void (*map_release)(struct bpf_map *map, struct file *map_file); 92 void (*map_free)(struct bpf_map *map); 93 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key); 94 void (*map_release_uref)(struct bpf_map *map); 95 void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key); 96 int (*map_lookup_batch)(struct bpf_map *map, const union bpf_attr *attr, 98 int (*map_lookup_and_delete_elem)(struct bpf_map *map, void *key, 100 int (*map_lookup_and_delete_batch)(struct bpf_map *ma 301 struct bpf_map { global() struct 303 opsbpf_map global() argument 304 inner_map_metabpf_map global() argument 308 map_typebpf_map global() argument 309 key_sizebpf_map global() argument 310 value_sizebpf_map global() argument 311 max_entriesbpf_map global() argument 335 ownerbpf_map global() argument 336 bypass_spec_v1bpf_map global() argument 337 frozenbpf_map global() argument 338 free_after_mult_rcu_gpbpf_map global() argument 339 free_after_rcu_gpbpf_map global() argument 340 sleepable_refcntbpf_map global() argument 341 elem_countbpf_map global() argument 342 cookiebpf_map global() argument 343 excl_prog_shabpf_map global() argument [all...] |
| H A D | bpf_local_storage.h | 46 struct bpf_map map; 135 struct bpf_map * 172 void bpf_local_storage_map_free(struct bpf_map *map, 175 int bpf_local_storage_map_check_btf(struct bpf_map *map, 205 u64 bpf_local_storage_map_mem_usage(const struct bpf_map *map);
|
| /linux/kernel/bpf/ |
| H A D | queue_stack_maps.c | 18 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() 126 static long __stack_map_get(struct bpf_map *map, void *value, bool delete) in __stack_map_get() 161 static long queue_map_peek_elem(struct bpf_map *map, void *value) in queue_map_peek_elem() 167 static long stack_map_peek_elem(struct bpf_map *map, void *value) in stack_map_peek_elem() 173 static long queue_map_pop_elem(struct bpf_map *map, void *value) in queue_map_pop_elem() 179 static long stack_map_pop_elem(struct bpf_map *map, void *value) in stack_map_pop_elem() [all …]
|
| H A D | bpf_insn_array.c | 7 struct bpf_map map; 37 static void insn_array_free(struct bpf_map *map) in insn_array_free() 44 static struct bpf_map *insn_array_alloc(union bpf_attr *attr) in insn_array_alloc() 64 static void *insn_array_lookup_elem(struct bpf_map *map, void *key) in insn_array_lookup_elem() 75 static long insn_array_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags) in insn_array_update_elem() 96 static long insn_array_delete_elem(struct bpf_map *map, void *key) in insn_array_delete_elem() 101 static int insn_array_check_btf(struct bpf_map *map, in insn_array_check_btf() 115 static u64 insn_array_mem_usage(const struct bpf_map *map) in insn_array_mem_usage() 120 static int insn_array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, u32 off) in insn_array_map_direct_value_addr() 150 static inline bool is_frozen(struct bpf_map *map) in is_frozen() [all …]
|
| H A D | arraymap.c | 84 static struct bpf_map *array_map_alloc(union bpf_attr *attr) in array_map_alloc() 167 static void *array_map_lookup_elem(struct bpf_map *map, void *key) in array_map_lookup_elem() 178 static int array_map_get_hash(struct bpf_map *map) in array_map_get_hash() 187 static int array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, in array_map_direct_value_addr() 201 static int array_map_direct_value_meta(const struct bpf_map *map, u64 imm, in array_map_direct_value_meta() 218 static int array_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in array_map_gen_lookup() 251 static void *percpu_array_map_lookup_elem(struct bpf_map *map, void *key) in percpu_array_map_lookup_elem() 262 static int percpu_array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, u32 off) in percpu_array_map_direct_value_addr() 277 static int percpu_array_map_direct_value_meta(const struct bpf_map *map, u64 imm, u32 *off) in percpu_array_map_direct_value_meta() 294 static int percpu_array_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in percpu_array_map_gen_lookup() [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) 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() 72 static long bloom_map_pop_elem(struct bpf_map *map, void *value) in bloom_map_pop_elem() 77 static long bloom_map_delete_elem(struct bpf_map *map, void *value) in bloom_map_delete_elem() 82 static int bloom_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in bloom_map_get_next_key() 99 static struct bpf_map *bloom_map_alloc(union bpf_attr *attr) in bloom_map_alloc() 161 static void bloom_map_free(struct bpf_map *map) in bloom_map_free() 169 static void *bloom_map_lookup_elem(struct bpf_map *map, void *key) in bloom_map_lookup_elem() 175 static long bloom_map_update_elem(struct bpf_map *map, void *key, in bloom_map_update_elem() [all …]
|
| H A D | bpf_inode_storage.c | 36 struct bpf_map *map, in inode_storage_lookup() 76 static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_lookup_elem() 88 static long bpf_fd_inode_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_inode_storage_update_elem() 105 static int inode_storage_delete(struct inode *inode, struct bpf_map *map) in inode_storage_delete() 116 static long bpf_fd_inode_storage_delete_elem(struct bpf_map *map, void *key) in bpf_fd_inode_storage_delete_elem() 125 BPF_CALL_4(bpf_inode_storage_get, struct bpf_map *, map, struct inode *, inode, in BPF_CALL_4() argument 161 struct bpf_map *, map, struct inode *, inode) in BPF_CALL_2() argument 173 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key() 179 static struct bpf_map *inode_storage_map_alloc(union bpf_attr *attr) in inode_storage_map_alloc() 193 static void inode_storage_map_free(struct bpf_map *map) in inode_storage_map_free()
|
| 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 | local_storage.c | 22 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() 132 static void *cgroup_storage_lookup_elem(struct bpf_map *_map, void *key) in cgroup_storage_lookup_elem() 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() 216 int bpf_percpu_cgroup_storage_update(struct bpf_map *_map, void *key, in bpf_percpu_cgroup_storage_update() 257 static int cgroup_storage_get_next_key(struct bpf_map *_map, void *key, in cgroup_storage_get_next_key() 297 static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr) in cgroup_storage_map_alloc() 342 static void cgroup_storage_map_free(struct bpf_map *_map) in cgroup_storage_map_free() [all …]
|
| H A D | hashtab.c | 87 struct bpf_map map; 203 static void *fd_htab_map_get_ptr(const struct bpf_map *map, struct htab_elem *l) in fd_htab_map_get_ptr() 510 static int bpf_ma_set_dtor(struct bpf_map *map, struct bpf_mem_alloc *ma, in bpf_ma_set_dtor() 543 static int htab_map_check_btf(struct bpf_map *map, const struct btf *btf, in htab_map_check_btf() 563 static struct bpf_map *htab_map_alloc(union bpf_attr *attr) in htab_map_alloc() 753 static void *__htab_map_lookup_elem(struct bpf_map *map, void *key) in __htab_map_lookup_elem() 773 static void *htab_map_lookup_elem(struct bpf_map *map, void *key) 794 static int htab_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf) in __htab_lru_map_lookup_elem() 800 (void *(*)(struct bpf_map *map, void *key))NULL)); in __htab_lru_map_lookup_elem() 809 static __always_inline void *__htab_lru_map_lookup_elem(struct bpf_map *ma in htab_lru_map_lookup_elem() [all...] |
| H A D | reuseport_array.c | 12 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 D | arena.c | 52 struct bpf_map map; 97 u64 bpf_arena_map_kern_vm_start(struct bpf_map *map) in bpf_arena_map_kern_vm_start() 110 struct bpf_map *bpf_prog_arena(struct bpf_prog *prog) in bpf_prog_arena() 117 static long arena_map_peek_elem(struct bpf_map *map, void *value) in arena_map_peek_elem() 122 static long arena_map_push_elem(struct bpf_map *map, void *value, u64 flags) in arena_map_push_elem() 127 static long arena_map_pop_elem(struct bpf_map *map, void *value) in arena_map_pop_elem() 132 static long arena_map_delete_elem(struct bpf_map *map, void *value) in arena_map_delete_elem() 137 static int arena_map_get_next_key(struct bpf_map *map, void *key, void *next_key) in arena_map_get_next_key() 266 static struct bpf_map *arena_map_alloc(union bpf_attr *attr) in arena_map_alloc() 370 static void arena_map_free(struct bpf_map *map) in arena_map_free() [all …]
|
| H A D | ringbuf.c | 83 struct bpf_map map; 194 static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) in ringbuf_map_alloc() 244 static void ringbuf_map_free(struct bpf_map *map) in ringbuf_map_free() 253 static void *ringbuf_map_lookup_elem(struct bpf_map *map, void *key) in ringbuf_map_lookup_elem() 258 static long ringbuf_map_update_elem(struct bpf_map *map, void *key, void *value, in ringbuf_map_update_elem() 264 static long ringbuf_map_delete_elem(struct bpf_map *map, void *key) in ringbuf_map_delete_elem() 269 static int ringbuf_map_get_next_key(struct bpf_map *map, void *key, in ringbuf_map_get_next_key() 275 static int ringbuf_map_mmap_kern(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_kern() 291 static int ringbuf_map_mmap_user(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_user() 336 static __poll_t ringbuf_map_poll_kern(struct bpf_map *map, struct file *filp, in ringbuf_map_poll_kern() [all …]
|
| H A D | bpf_struct_ops.c | 25 struct bpf_map map; 60 struct bpf_map __rcu *map; 511 static int bpf_struct_ops_map_get_next_key(struct bpf_map *map, void *key, in bpf_struct_ops_map_get_next_key() 521 int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key, in bpf_struct_ops_map_sys_lookup_elem() 558 static void *bpf_struct_ops_map_lookup_elem(struct bpf_map *map, void *key) in bpf_struct_ops_map_lookup_elem() 726 static long bpf_struct_ops_map_update_elem(struct bpf_map *map, void *key, in bpf_struct_ops_map_update_elem() 962 static long bpf_struct_ops_map_delete_elem(struct bpf_map *map, void *key) in bpf_struct_ops_map_delete_elem() 990 static void bpf_struct_ops_map_seq_show_elem(struct bpf_map *map, void *key, in bpf_struct_ops_map_seq_show_elem() 1012 static void __bpf_struct_ops_map_free(struct bpf_map *map) in __bpf_struct_ops_map_free() 1027 static void bpf_struct_ops_map_free(struct bpf_map *map) in bpf_struct_ops_map_free() [all …]
|
| /linux/net/xdp/ |
| H A D | xskmap.c | 64 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() 226 static long xsk_map_delete_elem(struct bpf_map *map, void *key) in xsk_map_delete_elem() [all …]
|
| /linux/net/core/ |
| H A D | sock_map.c | 18 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() 71 struct bpf_map *map; in sock_map_get_from_fd() 90 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() 218 static int sock_map_link(struct bpf_map *map, struct sock *sk) in sock_map_link() 340 static void sock_map_free(struct bpf_map *map) in sock_map_free() [all …]
|
| H A D | bpf_sk_storage.c | 21 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() 64 static void bpf_sk_storage_map_free(struct bpf_map *map) in bpf_sk_storage_map_free() 69 static struct bpf_map *bpf_sk_storage_map_alloc(union bpf_attr *attr) in bpf_sk_storage_map_alloc() 74 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key() 80 static void *bpf_fd_sk_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_fd_sk_storage_lookup_elem() 97 static long bpf_fd_sk_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_sk_storage_update_elem() 117 static long bpf_fd_sk_storage_delete_elem(struct bpf_map *map, void *key) in bpf_fd_sk_storage_delete_elem() 170 struct bpf_map *map; in bpf_sk_storage_clone() 228 BPF_CALL_4(bpf_sk_storage_get, struct bpf_map *, map, struct sock *, sk, in BPF_CALL_4() argument [all …]
|
| /linux/tools/perf/util/ |
| H A D | bpf_map.h | |
| /linux/kernel/bpf/preload/iterators/ |
| H A D | iterators.bpf.c | 15 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()
|