Lines Matching refs:bpf_map

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 *map,
97 int (*map_update_batch)(struct bpf_map *map, struct file *map_file,
100 int (*map_delete_batch)(struct bpf_map *map, const union bpf_attr *attr,
104 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
105 long (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
106 long (*map_delete_elem)(struct bpf_map *map, void *key);
107 long (*map_push_elem)(struct bpf_map *map, void *value, u64 flags);
108 long (*map_pop_elem)(struct bpf_map *map, void *value);
109 long (*map_peek_elem)(struct bpf_map *map, void *value);
110 void *(*map_lookup_percpu_elem)(struct bpf_map *map, void *key, u32 cpu);
113 void *(*map_fd_get_ptr)(struct bpf_map *map, struct file *map_file,
119 void (*map_fd_put_ptr)(struct bpf_map *map, void *ptr, bool need_defer);
120 int (*map_gen_lookup)(struct bpf_map *map, struct bpf_insn *insn_buf);
122 void (*map_seq_show_elem)(struct bpf_map *map, void *key,
124 int (*map_check_btf)(const struct bpf_map *map,
130 int (*map_poke_track)(struct bpf_map *map, struct bpf_prog_aux *aux);
131 void (*map_poke_untrack)(struct bpf_map *map, struct bpf_prog_aux *aux);
132 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
136 int (*map_direct_value_addr)(const struct bpf_map *map,
138 int (*map_direct_value_meta)(const struct bpf_map *map,
140 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);
141 __poll_t (*map_poll)(struct bpf_map *map, struct file *filp,
155 long (*map_redirect)(struct bpf_map *map, u64 key, u64 flags);
166 bool (*map_meta_equal)(const struct bpf_map *meta0,
167 const struct bpf_map *meta1);
173 long (*map_for_each_callback)(struct bpf_map *map,
177 u64 (*map_mem_usage)(const struct bpf_map *map);
257 struct bpf_map {
259 struct bpf_map *inner_map_meta;
443 static inline void check_and_init_map_value(struct bpf_map *map, void *dst)
490 static inline void copy_map_value(struct bpf_map *map, void *dst, void *src)
495 static inline void copy_map_value_long(struct bpf_map *map, void *dst, void *src)
520 static inline void zero_map_value(struct bpf_map *map, void *dst)
525 void copy_map_value_locked(struct bpf_map *map, void *dst, void *src,
550 struct bpf_map map;
557 static inline struct bpf_offloaded_map *map_to_offmap(struct bpf_map *map)
562 static inline bool bpf_map_offload_neutral(const struct bpf_map *map)
567 static inline bool bpf_map_support_seq_show(const struct bpf_map *map)
573 int map_check_no_btf(const struct bpf_map *map,
578 bool bpf_map_meta_equal(const struct bpf_map *meta0,
579 const struct bpf_map *meta1);
707 ARG_CONST_MAP_PTR, /* const argument used as pointer to bpf_map */
858 CONST_PTR_TO_MAP, /* reg points to struct bpf_map */
1404 struct bpf_map *map;
1478 struct bpf_map **used_maps;
1486 struct bpf_map *cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE];
1566 struct bpf_map *map;
1603 int (*update_map)(struct bpf_link *link, struct bpf_map *new_map,
1604 struct bpf_map *old_map);
1781 int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key,
1825 void bpf_map_struct_ops_info_fill(struct bpf_map_info *info, struct bpf_map *map);
1837 static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map,
1847 static inline void bpf_map_struct_ops_info_fill(struct bpf_map_info *info, struct bpf_map *map)
1873 struct bpf_map map;
1907 static inline u32 bpf_map_flags_to_cap(struct bpf_map *map)
1935 static inline bool map_type_contains_progs(struct bpf_map *map)
1942 bool bpf_prog_map_compatible(struct bpf_map *map, const struct bpf_prog *fp);
1956 u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size,
2198 void bpf_map_free_id(struct bpf_map *map);
2203 void bpf_map_free_record(struct bpf_map *map);
2210 struct bpf_map *bpf_map_get(u32 ufd);
2211 struct bpf_map *bpf_map_get_with_uref(u32 ufd);
2212 struct bpf_map *__bpf_map_get(struct fd f);
2213 void bpf_map_inc(struct bpf_map *map);
2214 void bpf_map_inc_with_uref(struct bpf_map *map);
2215 struct bpf_map *__bpf_map_inc_not_zero(struct bpf_map *map, bool uref);
2216 struct bpf_map * __must_check bpf_map_inc_not_zero(struct bpf_map *map);
2217 void bpf_map_put_with_uref(struct bpf_map *map);
2218 void bpf_map_put(struct bpf_map *map);
2222 bool bpf_map_write_active(const struct bpf_map *map);
2223 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
2224 int generic_map_lookup_batch(struct bpf_map *map,
2227 int generic_map_update_batch(struct bpf_map *map, struct file *map_file,
2230 int generic_map_delete_batch(struct bpf_map *map,
2233 struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
2236 int bpf_map_alloc_pages(const struct bpf_map *map, gfp_t gfp, int nid,
2239 void *bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
2241 void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags);
2242 void *bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size,
2244 void __percpu *bpf_map_alloc_percpu(const struct bpf_map *map, size_t size,
2248 bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
2255 bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags)
2261 bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size, gfp_t flags)
2267 bpf_map_alloc_percpu(const struct bpf_map *map, size_t size, size_t align,
2275 bpf_map_init_elem_count(struct bpf_map *map)
2288 bpf_map_free_elem_count(struct bpf_map *map)
2293 static inline void bpf_map_inc_elem_count(struct bpf_map *map)
2298 static inline void bpf_map_dec_elem_count(struct bpf_map *map)
2327 int bpf_map_new_fd(struct bpf_map *map, int flags);
2385 struct bpf_map *map;
2436 __bpf_md_ptr(struct bpf_map *, map);
2460 int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);
2461 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);
2462 int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,
2464 int bpf_percpu_array_update(struct bpf_map *map, void *key, void *value,
2467 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value);
2469 int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file,
2471 int bpf_fd_array_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2472 int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file,
2474 int bpf_fd_htab_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2501 struct bpf_map *map, bool exclude_ingress);
2505 struct bpf_prog *xdp_prog, struct bpf_map *map,
2758 struct bpf_map *map, bool exclude_ingress)
2774 struct bpf_prog *xdp_prog, struct bpf_map *map,
2838 static inline void bpf_map_put(struct bpf_map *map)
2939 struct bpf_map **used_maps, u32 len);
2948 int bpf_map_offload_info_fill(struct bpf_map_info *info, struct bpf_map *map);
2950 int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value);
2951 int bpf_map_offload_update_elem(struct bpf_map *map,
2953 int bpf_map_offload_delete_elem(struct bpf_map *map, void *key);
2954 int bpf_map_offload_get_next_key(struct bpf_map *map,
2957 bool bpf_offload_prog_map_match(struct bpf_prog *prog, struct bpf_map *map);
2991 static inline bool bpf_map_is_offloaded(struct bpf_map *map)
2996 struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr);
2997 void bpf_map_offload_map_free(struct bpf_map *map);
2998 u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map);
3005 int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, u64 flags);
3056 static inline bool bpf_map_is_offloaded(struct bpf_map *map)
3061 static inline struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr)
3066 static inline void bpf_map_offload_map_free(struct bpf_map *map)
3070 static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map)
3095 static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value,
3127 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key,
3129 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
3137 static inline int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map,
3143 static inline int bpf_fd_reuseport_array_update_elem(struct bpf_map *map,