Lines Matching refs:htab_elem
96 struct htab_elem *__percpu *extra_elems;
111 struct htab_elem { struct
118 struct htab_elem *batch_flink; argument
194 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr()
200 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr()
205 static void *fd_htab_map_get_ptr(const struct bpf_map *map, struct htab_elem *l) in fd_htab_map_get_ptr()
210 static struct htab_elem *get_htab_elem(struct bpf_htab *htab, int i) in get_htab_elem()
212 return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); in get_htab_elem()
231 struct htab_elem *elem; in htab_free_prealloced_timers()
249 struct htab_elem *elem; in htab_free_prealloced_fields()
298 static struct htab_elem *prealloc_lru_pop(struct bpf_htab *htab, void *key, in prealloc_lru_pop()
302 struct htab_elem *l; in prealloc_lru_pop()
306 l = container_of(node, struct htab_elem, lru_node); in prealloc_lru_pop()
347 offsetof(struct htab_elem, hash) - in prealloc_init()
348 offsetof(struct htab_elem, lru_node), in prealloc_init()
359 offsetof(struct htab_elem, lru_node), in prealloc_init()
363 htab->elems + offsetof(struct htab_elem, fnode), in prealloc_init()
385 struct htab_elem *__percpu *pptr, *l_new; in alloc_extra_elems()
389 pptr = bpf_map_alloc_percpu(&htab->map, sizeof(struct htab_elem *), 8, in alloc_extra_elems()
399 l_new = container_of(l, struct htab_elem, fnode); in alloc_extra_elems()
423 BUILD_BUG_ON(offsetof(struct htab_elem, fnode.next) != in htab_map_alloc_check()
424 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()
627 static struct htab_elem *lookup_elem_raw(struct hlist_nulls_head *head, u32 hash, in lookup_elem_raw()
631 struct htab_elem *l; in lookup_elem_raw()
644 static struct htab_elem *lookup_nulls_elem_raw(struct hlist_nulls_head *head, in lookup_nulls_elem_raw()
649 struct htab_elem *l; in lookup_nulls_elem_raw()
671 struct htab_elem *l; in __htab_map_lookup_elem()
690 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_map_lookup_elem()
719 offsetof(struct htab_elem, key) + in htab_map_gen_lookup()
727 struct htab_elem *l = __htab_map_lookup_elem(map, key); in __htab_lru_map_lookup_elem()
760 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
764 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
768 offsetof(struct htab_elem, key) + in htab_lru_map_gen_lookup()
774 struct htab_elem *elem) in check_and_free_fields()
795 struct htab_elem *l = NULL, *tgt_l; in htab_lru_map_delete_node()
802 tgt_l = container_of(node, struct htab_elem, lru_node); in htab_lru_map_delete_node()
828 struct htab_elem *l, *next_l; in htab_map_get_next_key()
851 struct htab_elem, hash_node); in htab_map_get_next_key()
870 struct htab_elem, hash_node); in htab_map_get_next_key()
882 static void htab_elem_free(struct bpf_htab *htab, struct htab_elem *l) in htab_elem_free()
890 static void htab_put_fd_value(struct bpf_htab *htab, struct htab_elem *l) in htab_put_fd_value()
930 static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l) in free_htab_elem()
990 static struct htab_elem *alloc_htab_elem(struct bpf_htab *htab, void *key, in alloc_htab_elem()
993 struct htab_elem *old_elem) in alloc_htab_elem()
997 struct htab_elem *l_new, **pl_new; in alloc_htab_elem()
1015 l_new = container_of(l, struct htab_elem, fnode); in alloc_htab_elem()
1071 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags()
1090 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem()
1182 static void htab_lru_push_free(struct bpf_htab *htab, struct htab_elem *elem) in htab_lru_push_free()
1193 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem()
1262 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem()
1317 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem()
1401 struct htab_elem *l; in htab_map_delete_elem()
1437 struct htab_elem *l; in htab_lru_map_delete_elem()
1479 struct htab_elem *l; in delete_all_elements()
1497 struct htab_elem *l; in htab_free_malloced_timers()
1584 struct htab_elem *l; in __htab_map_lookup_and_delete_elem()
1685 struct htab_elem *node_to_free = NULL; in __htab_map_lookup_and_delete_batch()
1691 struct htab_elem *l; in __htab_map_lookup_and_delete_batch()
1976 static struct htab_elem *
1978 struct htab_elem *prev_elem) in bpf_hash_map_seq_find_next()
1985 struct htab_elem *elem; in bpf_hash_map_seq_find_next()
1998 elem = hlist_nulls_entry_safe(n, struct htab_elem, hash_node); in bpf_hash_map_seq_find_next()
2035 struct htab_elem *elem; in bpf_hash_map_seq_start()
2055 static int __bpf_hash_map_seq_show(struct seq_file *seq, struct htab_elem *elem) in __bpf_hash_map_seq_show()
2159 struct htab_elem *elem; in bpf_for_each_hash_elem()
2231 usage += sizeof(struct htab_elem *) * num_possible_cpus(); in htab_map_mem_usage()
2294 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_percpu_map_lookup_elem()
2304 struct htab_elem *l; in htab_percpu_map_lookup_percpu_elem()
2318 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_lru_percpu_map_lookup_elem()
2330 struct htab_elem *l; in htab_lru_percpu_map_lookup_percpu_elem()
2346 struct htab_elem *l; in bpf_percpu_hash_copy()
2397 struct htab_elem *l; in htab_percpu_map_seq_show_elem()
2475 struct htab_elem *l; in fd_htab_map_free()
2570 offsetof(struct htab_elem, key) + in htab_of_map_gen_lookup()