Lines Matching refs:bpf_map
38 struct bpf_map;
78 struct bpf_map *(*map_alloc)(union bpf_attr *attr);
79 void (*map_release)(struct bpf_map *map, struct file *map_file);
80 void (*map_free)(struct bpf_map *map);
81 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
82 void (*map_release_uref)(struct bpf_map *map);
83 void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key);
84 int (*map_lookup_batch)(struct bpf_map *map, const union bpf_attr *attr,
86 int (*map_lookup_and_delete_elem)(struct bpf_map *map, void *key,
88 int (*map_lookup_and_delete_batch)(struct bpf_map *map,
91 int (*map_update_batch)(struct bpf_map *map, struct file *map_file,
94 int (*map_delete_batch)(struct bpf_map *map, const union bpf_attr *attr,
98 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
99 long (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
100 long (*map_delete_elem)(struct bpf_map *map, void *key);
101 long (*map_push_elem)(struct bpf_map *map, void *value, u64 flags);
102 long (*map_pop_elem)(struct bpf_map *map, void *value);
103 long (*map_peek_elem)(struct bpf_map *map, void *value);
104 void *(*map_lookup_percpu_elem)(struct bpf_map *map, void *key, u32 cpu);
107 void *(*map_fd_get_ptr)(struct bpf_map *map, struct file *map_file,
110 int (*map_gen_lookup)(struct bpf_map *map, struct bpf_insn *insn_buf);
112 void (*map_seq_show_elem)(struct bpf_map *map, void *key,
114 int (*map_check_btf)(const struct bpf_map *map,
120 int (*map_poke_track)(struct bpf_map *map, struct bpf_prog_aux *aux);
121 void (*map_poke_untrack)(struct bpf_map *map, struct bpf_prog_aux *aux);
122 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
126 int (*map_direct_value_addr)(const struct bpf_map *map,
128 int (*map_direct_value_meta)(const struct bpf_map *map,
130 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);
131 __poll_t (*map_poll)(struct bpf_map *map, struct file *filp,
142 long (*map_redirect)(struct bpf_map *map, u64 key, u64 flags);
153 bool (*map_meta_equal)(const struct bpf_map *meta0,
154 const struct bpf_map *meta1);
160 long (*map_for_each_callback)(struct bpf_map *map,
164 u64 (*map_mem_usage)(const struct bpf_map *map);
243 struct bpf_map { struct
248 struct bpf_map *inner_map_meta; argument
423 static inline void check_and_init_map_value(struct bpf_map *map, void *dst) in check_and_init_map_value()
470 static inline void copy_map_value(struct bpf_map *map, void *dst, void *src) in copy_map_value()
475 static inline void copy_map_value_long(struct bpf_map *map, void *dst, void *src) in copy_map_value_long()
500 static inline void zero_map_value(struct bpf_map *map, void *dst) in zero_map_value()
505 void copy_map_value_locked(struct bpf_map *map, void *dst, void *src,
530 struct bpf_map map;
537 static inline struct bpf_offloaded_map *map_to_offmap(struct bpf_map *map) in map_to_offmap()
542 static inline bool bpf_map_offload_neutral(const struct bpf_map *map) in bpf_map_offload_neutral()
547 static inline bool bpf_map_support_seq_show(const struct bpf_map *map) in bpf_map_support_seq_show()
553 int map_check_no_btf(const struct bpf_map *map,
558 bool bpf_map_meta_equal(const struct bpf_map *meta0,
559 const struct bpf_map *meta1);
1347 struct bpf_map *map;
1413 struct bpf_map **used_maps;
1421 struct bpf_map *cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE];
1498 struct bpf_map *map;
1521 int (*update_map)(struct bpf_link *link, struct bpf_map *new_map,
1522 struct bpf_map *old_map);
1628 int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key,
1683 static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, in bpf_struct_ops_map_sys_lookup_elem()
1712 struct bpf_map map;
1746 static inline u32 bpf_map_flags_to_cap(struct bpf_map *map) in bpf_map_flags_to_cap()
1774 static inline bool map_type_contains_progs(struct bpf_map *map) in map_type_contains_progs()
1781 bool bpf_prog_map_compatible(struct bpf_map *map, const struct bpf_prog *fp);
1795 u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size,
2036 void bpf_map_free_id(struct bpf_map *map);
2041 void bpf_map_free_record(struct bpf_map *map);
2047 struct bpf_map *bpf_map_get(u32 ufd);
2048 struct bpf_map *bpf_map_get_with_uref(u32 ufd);
2049 struct bpf_map *__bpf_map_get(struct fd f);
2050 void bpf_map_inc(struct bpf_map *map);
2051 void bpf_map_inc_with_uref(struct bpf_map *map);
2052 struct bpf_map *__bpf_map_inc_not_zero(struct bpf_map *map, bool uref);
2053 struct bpf_map * __must_check bpf_map_inc_not_zero(struct bpf_map *map);
2054 void bpf_map_put_with_uref(struct bpf_map *map);
2055 void bpf_map_put(struct bpf_map *map);
2059 bool bpf_map_write_active(const struct bpf_map *map);
2060 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
2061 int generic_map_lookup_batch(struct bpf_map *map,
2064 int generic_map_update_batch(struct bpf_map *map, struct file *map_file,
2067 int generic_map_delete_batch(struct bpf_map *map,
2070 struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
2074 void *bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags,
2076 void *bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags);
2077 void *bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size,
2079 void __percpu *bpf_map_alloc_percpu(const struct bpf_map *map, size_t size,
2083 bpf_map_kmalloc_node(const struct bpf_map *map, size_t size, gfp_t flags, in bpf_map_kmalloc_node()
2090 bpf_map_kzalloc(const struct bpf_map *map, size_t size, gfp_t flags) in bpf_map_kzalloc()
2096 bpf_map_kvcalloc(struct bpf_map *map, size_t n, size_t size, gfp_t flags) in bpf_map_kvcalloc()
2102 bpf_map_alloc_percpu(const struct bpf_map *map, size_t size, size_t align, in bpf_map_alloc_percpu()
2110 bpf_map_init_elem_count(struct bpf_map *map) in bpf_map_init_elem_count()
2123 bpf_map_free_elem_count(struct bpf_map *map) in bpf_map_free_elem_count()
2128 static inline void bpf_map_inc_elem_count(struct bpf_map *map) in bpf_map_inc_elem_count()
2133 static inline void bpf_map_dec_elem_count(struct bpf_map *map) in bpf_map_dec_elem_count()
2160 int bpf_map_new_fd(struct bpf_map *map, int flags);
2205 struct bpf_map *map;
2256 __bpf_md_ptr(struct bpf_map *, map);
2280 int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);
2281 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);
2282 int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,
2284 int bpf_percpu_array_update(struct bpf_map *map, void *key, void *value,
2287 int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value);
2289 int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file,
2291 int bpf_fd_array_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2292 int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file,
2294 int bpf_fd_htab_map_lookup_elem(struct bpf_map *map, void *key, u32 *value);
2321 struct bpf_map *map, bool exclude_ingress);
2325 struct bpf_prog *xdp_prog, struct bpf_map *map,
2557 struct bpf_map *map, bool exclude_ingress) in dev_map_enqueue_multi()
2573 struct bpf_prog *xdp_prog, struct bpf_map *map, in dev_map_redirect_multi()
2637 static inline void bpf_map_put(struct bpf_map *map) in bpf_map_put()
2738 struct bpf_map **used_maps, u32 len);
2747 int bpf_map_offload_info_fill(struct bpf_map_info *info, struct bpf_map *map);
2749 int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value);
2750 int bpf_map_offload_update_elem(struct bpf_map *map,
2752 int bpf_map_offload_delete_elem(struct bpf_map *map, void *key);
2753 int bpf_map_offload_get_next_key(struct bpf_map *map,
2756 bool bpf_offload_prog_map_match(struct bpf_prog *prog, struct bpf_map *map);
2790 static inline bool bpf_map_is_offloaded(struct bpf_map *map) in bpf_map_is_offloaded()
2795 struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr);
2796 void bpf_map_offload_map_free(struct bpf_map *map);
2797 u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map);
2804 int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, u64 flags);
2855 static inline bool bpf_map_is_offloaded(struct bpf_map *map) in bpf_map_is_offloaded()
2860 static inline struct bpf_map *bpf_map_offload_map_alloc(union bpf_attr *attr) in bpf_map_offload_map_alloc()
2865 static inline void bpf_map_offload_map_free(struct bpf_map *map) in bpf_map_offload_map_free()
2869 static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map) in bpf_map_offload_map_mem_usage()
2894 static inline int sock_map_update_elem_sys(struct bpf_map *map, void *key, void *value, in sock_map_update_elem_sys()
2910 int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, void *key,
2912 int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
2920 static inline int bpf_fd_reuseport_array_lookup_elem(struct bpf_map *map, in bpf_fd_reuseport_array_lookup_elem()
2926 static inline int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, in bpf_fd_reuseport_array_update_elem()