Lines Matching refs:bpf_map
40 struct bpf_map;
85 struct bpf_map *(*map_alloc)(union bpf_attr *attr);
86 void (*map_release)(struct bpf_map *map, struct file *map_file);
87 void (*map_free)(struct bpf_map *map);
88 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
89 void (*map_release_uref)(struct bpf_map *map);
90 void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key);
91 int (*map_lookup_batch)(struct bpf_map *map, const union bpf_attr *attr,
93 int (*map_lookup_and_delete_elem)(struct bpf_map *map, void *key,
95 int (*map_lookup_and_delete_batch)(struct bpf_map *map,
98 int (*map_update_batch)(struct bpf_map *map, struct file *map_file,
101 int (*map_delete_batch)(struct bpf_map *map, const union bpf_attr *attr,
105 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
106 long (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
107 long (*map_delete_elem)(struct bpf_map *map, void *key);
108 long (*map_push_elem)(struct bpf_map *map, void *value, u64 flags);
109 long (*map_pop_elem)(struct bpf_map *map, void *value);
110 long (*map_peek_elem)(struct bpf_map *map, void *value);
111 void *(*map_lookup_percpu_elem)(struct bpf_map *map, void *key, u32 cpu);
114 void *(*map_fd_get_ptr)(struct bpf_map *map, struct file *map_file,
120 void (*map_fd_put_ptr)(struct bpf_map *map, void *ptr, bool need_defer);
121 int (*map_gen_lookup)(struct bpf_map *map, struct bpf_insn *insn_buf);
123 void (*map_seq_show_elem)(struct bpf_map *map, void *key,
125 int (*map_check_btf)(const struct bpf_map *map,
131 int (*map_poke_track)(struct bpf_map *map, struct bpf_prog_aux *aux);
132 void (*map_poke_untrack)(struct bpf_map *map, struct bpf_prog_aux *aux);
133 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
137 int (*map_direct_value_addr)(const struct bpf_map *map,
139 int (*map_direct_value_meta)(const struct bpf_map *map,
141 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);
142 __poll_t (*map_poll)(struct bpf_map *map, struct file *filp,
156 long (*map_redirect)(struct bpf_map *map, u64 key, u64 flags);
167 bool (*map_meta_equal)(const struct bpf_map *meta0,
168 const struct bpf_map *meta1);
174 long (*map_for_each_callback)(struct bpf_map *map,
178 u64 (*map_mem_usage)(const struct bpf_map *map);
263 struct bpf_map { struct
265 struct bpf_map *inner_map_meta; argument
469 static inline void check_and_init_map_value(struct bpf_map *map, void *dst) in check_and_init_map_value()
516 static inline void copy_map_value(struct bpf_map *map, void *dst, void *src) in copy_map_value()
521 static inline void copy_map_value_long(struct bpf_map *map, void *dst, void *src) in copy_map_value_long()
565 static inline void zero_map_value(struct bpf_map *map, void *dst) in zero_map_value()
570 void copy_map_value_locked(struct bpf_map *map, void *dst, void *src,
596 struct bpf_map map;
603 static inline struct bpf_offloaded_map *map_to_offmap(struct bpf_map *map) in map_to_offmap()
608 static inline bool bpf_map_offload_neutral(const struct bpf_map *map) in bpf_map_offload_neutral()
613 static inline bool bpf_map_support_seq_show(const struct bpf_map *map) in bpf_map_support_seq_show()
619 int map_check_no_btf(const struct bpf_map *map,
624 bool bpf_map_meta_equal(const struct bpf_map *meta0,
625 const struct bpf_map *meta1);
1494 struct bpf_map *map;
1581 struct bpf_map **used_maps;
1589 struct bpf_map *cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE];
1669 struct bpf_map *map;
1713 int (*update_map)(struct bpf_link *link, struct bpf_map *new_map,
1714 struct bpf_map *old_map);
1899 int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key,
1943 void bpf_map_struct_ops_info_fill(struct bpf_map_info *info, struct bpf_map *map);
1959 static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, in bpf_struct_ops_map_sys_lookup_elem()
1969 static inline void bpf_map_struct_ops_info_fill(struct bpf_map_info *info, struct bpf_map *map) in bpf_map_struct_ops_info_fill()
1998 struct bpf_map map;
2033 static inline u32 bpf_map_flags_to_cap(struct bpf_map *map) in bpf_map_flags_to_cap()
2061 static inline bool map_type_contains_progs(struct bpf_map *map) in map_type_contains_progs()
2068 bool bpf_prog_map_compatible(struct bpf_map *map, const struct bpf_prog *fp);
2084 u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size,
2323 void bpf_map_free_id(struct bpf_map *map);
2328 void bpf_map_free_record(struct bpf_map *map);
2336 struct bpf_map *bpf_map_get(u32 ufd);
2337 struct bpf_map *bpf_map_get_with_uref(u32 ufd);
2347 static inline struct bpf_map *__bpf_map_get(struct fd f) in __bpf_map_get()
2365 void bpf_map_inc(struct bpf_map *map);
2366 void bpf_map_inc_with_uref(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);
2369 void bpf_map_put_with_uref(struct bpf_map *map);
2370 void bpf_map_put(struct bpf_map *map);
2374 bool bpf_map_write_active(const struct bpf_map *map);
2375 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
2376 int generic_map_lookup_batch(struct bpf_map *map,
2379 int generic_map_update_batch(struct bpf_map *map, struct file *map_file,
2382 int generic_map_delete_batch(struct bpf_map *map,
2385 struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
2388 int bpf_map_alloc_pages(const struct bpf_map *map, int nid,
2391 void *bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
2393 void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags);
2394 void *bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size,
2396 void __percpu *bpf_map_alloc_percpu(const struct bpf_map *map, size_t size,
2414 bpf_map_init_elem_count(struct bpf_map *map) in bpf_map_init_elem_count()
2427 bpf_map_free_elem_count(struct bpf_map *map) in bpf_map_free_elem_count()
2432 static inline void bpf_map_inc_elem_count(struct bpf_map *map) in bpf_map_inc_elem_count()
2437 static inline void bpf_map_dec_elem_count(struct bpf_map *map) in bpf_map_dec_elem_count()
2466 int bpf_map_new_fd(struct bpf_map *map, int flags);
2528 struct bpf_map *map;
2579 __bpf_md_ptr(struct bpf_map *, map);
2603 int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);
2604 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);
2605 int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,
2607 int bpf_percpu_array_update(struct bpf_map *map, void *key, void *value,
2610 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value);
2612 int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file,
2614 int bpf_fd_array_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2615 int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file,
2617 int bpf_fd_htab_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2644 struct bpf_map *map, bool exclude_ingress);
2649 struct bpf_map *map, bool exclude_ingress);
2910 struct bpf_map *map, bool exclude_ingress) in dev_map_enqueue_multi()
2927 struct bpf_map *map, bool exclude_ingress) in dev_map_redirect_multi()
2990 static inline void bpf_map_put(struct bpf_map *map) in bpf_map_put()
3090 struct bpf_map **used_maps, u32 len);
3099 int bpf_map_offload_info_fill(struct bpf_map_info *info, struct bpf_map *map);
3101 int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value);
3102 int bpf_map_offload_update_elem(struct bpf_map *map,
3104 int bpf_map_offload_delete_elem(struct bpf_map *map, void *key);
3105 int bpf_map_offload_get_next_key(struct bpf_map *map,
3108 bool bpf_offload_prog_map_match(struct bpf_prog *prog, struct bpf_map *map);
3142 static inline bool bpf_map_is_offloaded(struct bpf_map *map) in bpf_map_is_offloaded()
3147 struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr);
3148 void bpf_map_offload_map_free(struct bpf_map *map);
3149 u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map);
3156 int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, u64 flags);
3208 static inline bool bpf_map_is_offloaded(struct bpf_map *map) in bpf_map_is_offloaded()
3213 static inline struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr) in bpf_map_offload_map_alloc()
3218 static inline void bpf_map_offload_map_free(struct bpf_map *map) in bpf_map_offload_map_free()
3222 static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map) in bpf_map_offload_map_mem_usage()
3247 static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, in sock_map_update_elem_sys()
3284 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key,
3286 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
3294 static inline int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, in bpf_fd_reuseport_array_lookup_elem()
3300 static inline int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, in bpf_fd_reuseport_array_update_elem()