Lines Matching refs:htab_elem
96 struct htab_elem *__percpu *extra_elems;
111 struct htab_elem { struct
118 struct htab_elem *batch_flink; argument
197 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr()
203 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr()
208 static void *fd_htab_map_get_ptr(const struct bpf_map *map, struct htab_elem *l) in fd_htab_map_get_ptr()
213 static struct htab_elem *get_htab_elem(struct bpf_htab *htab, int i) in get_htab_elem()
215 return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); in get_htab_elem()
234 struct htab_elem *elem; in htab_free_prealloced_timers()
255 struct htab_elem *elem; in htab_free_prealloced_kptrs()
293 static struct htab_elem *prealloc_lru_pop(struct bpf_htab *htab, void *key, in prealloc_lru_pop()
297 struct htab_elem *l; in prealloc_lru_pop()
300 l = container_of(node, struct htab_elem, lru_node); in prealloc_lru_pop()
341 offsetof(struct htab_elem, hash) - in prealloc_init()
342 offsetof(struct htab_elem, lru_node), in prealloc_init()
353 offsetof(struct htab_elem, lru_node), in prealloc_init()
357 htab->elems + offsetof(struct htab_elem, fnode), in prealloc_init()
379 struct htab_elem *__percpu *pptr, *l_new; in alloc_extra_elems()
383 pptr = bpf_map_alloc_percpu(&htab->map, sizeof(struct htab_elem *), 8, in alloc_extra_elems()
393 l_new = container_of(l, struct htab_elem, fnode); in alloc_extra_elems()
417 BUILD_BUG_ON(offsetof(struct htab_elem, fnode.next) != in htab_map_alloc_check()
418 offsetof(struct htab_elem, hash_node.pprev)); in htab_map_alloc_check()
451 sizeof(struct htab_elem)) in htab_map_alloc_check()
501 htab->elem_size = sizeof(struct htab_elem) + in htab_map_alloc()
619 static struct htab_elem *lookup_elem_raw(struct hlist_nulls_head *head, u32 hash, in lookup_elem_raw()
623 struct htab_elem *l; in lookup_elem_raw()
636 static struct htab_elem *lookup_nulls_elem_raw(struct hlist_nulls_head *head, in lookup_nulls_elem_raw()
641 struct htab_elem *l; in lookup_nulls_elem_raw()
663 struct htab_elem *l; in __htab_map_lookup_elem()
682 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_map_lookup_elem()
711 offsetof(struct htab_elem, key) + in htab_map_gen_lookup()
719 struct htab_elem *l = __htab_map_lookup_elem(map, key); in __htab_lru_map_lookup_elem()
752 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
756 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
760 offsetof(struct htab_elem, key) + in htab_lru_map_gen_lookup()
766 struct htab_elem *elem) in check_and_free_fields()
782 struct htab_elem *l = NULL, *tgt_l; in htab_lru_map_delete_node()
789 tgt_l = container_of(node, struct htab_elem, lru_node); in htab_lru_map_delete_node()
814 struct htab_elem *l, *next_l; in htab_map_get_next_key()
837 struct htab_elem, hash_node); in htab_map_get_next_key()
856 struct htab_elem, hash_node); in htab_map_get_next_key()
868 static void htab_elem_free(struct bpf_htab *htab, struct htab_elem *l) in htab_elem_free()
876 static void htab_put_fd_value(struct bpf_htab *htab, struct htab_elem *l) in htab_put_fd_value()
912 static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l) in free_htab_elem()
974 static struct htab_elem *alloc_htab_elem(struct bpf_htab *htab, void *key, in alloc_htab_elem()
977 struct htab_elem *old_elem) in alloc_htab_elem()
981 struct htab_elem *l_new, **pl_new; in alloc_htab_elem()
999 l_new = container_of(l, struct htab_elem, fnode); in alloc_htab_elem()
1054 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags()
1073 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem()
1165 static void htab_lru_push_free(struct bpf_htab *htab, struct htab_elem *elem) in htab_lru_push_free()
1175 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem()
1244 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem()
1299 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem()
1381 struct htab_elem *l; in htab_map_delete_elem()
1417 struct htab_elem *l; in htab_lru_map_delete_elem()
1459 struct htab_elem *l; in delete_all_elements()
1477 struct htab_elem *l; in htab_free_malloced_timers()
1568 struct htab_elem *l; in __htab_map_lookup_and_delete_elem()
1670 struct htab_elem *node_to_free = NULL; in __htab_map_lookup_and_delete_batch()
1676 struct htab_elem *l; in __htab_map_lookup_and_delete_batch()
1961 static struct htab_elem *
1963 struct htab_elem *prev_elem) in bpf_hash_map_seq_find_next()
1970 struct htab_elem *elem; in bpf_hash_map_seq_find_next()
1983 elem = hlist_nulls_entry_safe(n, struct htab_elem, hash_node); in bpf_hash_map_seq_find_next()
2020 struct htab_elem *elem; in bpf_hash_map_seq_start()
2040 static int __bpf_hash_map_seq_show(struct seq_file *seq, struct htab_elem *elem) in __bpf_hash_map_seq_show()
2144 struct htab_elem *elem; in bpf_for_each_hash_elem()
2239 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_percpu_map_lookup_elem()
2249 struct htab_elem *l; in htab_percpu_map_lookup_percpu_elem()
2263 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_lru_percpu_map_lookup_elem()
2275 struct htab_elem *l; in htab_lru_percpu_map_lookup_percpu_elem()
2291 struct htab_elem *l; in bpf_percpu_hash_copy()
2342 struct htab_elem *l; in htab_percpu_map_seq_show_elem()
2418 struct htab_elem *l; in fd_htab_map_free()
2513 offsetof(struct htab_elem, key) + in htab_of_map_gen_lookup()