Lines Matching refs:htab_elem
100 struct htab_elem *__percpu *extra_elems;
110 struct htab_elem { struct
118 struct htab_elem *batch_flink; argument
210 static inline void htab_elem_set_ptr(struct htab_elem *l, u32 key_size, in htab_elem_set_ptr()
216 static inline void __percpu *htab_elem_get_ptr(struct htab_elem *l, u32 key_size) in htab_elem_get_ptr()
221 static void *fd_htab_map_get_ptr(const struct bpf_map *map, struct htab_elem *l) in fd_htab_map_get_ptr()
226 static struct htab_elem *get_htab_elem(struct bpf_htab *htab, int i) in get_htab_elem()
228 return (struct htab_elem *) (htab->elems + i * (u64)htab->elem_size); in get_htab_elem()
247 struct htab_elem *elem; in htab_free_prealloced_timers()
287 static struct htab_elem *prealloc_lru_pop(struct bpf_htab *htab, void *key, in prealloc_lru_pop()
291 struct htab_elem *l; in prealloc_lru_pop()
296 l = container_of(node, struct htab_elem, lru_node); in prealloc_lru_pop()
339 offsetof(struct htab_elem, hash) - in prealloc_init()
340 offsetof(struct htab_elem, lru_node), in prealloc_init()
351 offsetof(struct htab_elem, lru_node), in prealloc_init()
355 htab->elems + offsetof(struct htab_elem, fnode), in prealloc_init()
377 struct htab_elem *__percpu *pptr, *l_new; in alloc_extra_elems()
381 pptr = bpf_map_alloc_percpu(&htab->map, sizeof(struct htab_elem *), 8, in alloc_extra_elems()
391 l_new = container_of(l, struct htab_elem, fnode); in alloc_extra_elems()
415 BUILD_BUG_ON(offsetof(struct htab_elem, htab) != in htab_map_alloc_check()
416 offsetof(struct htab_elem, hash_node.pprev)); in htab_map_alloc_check()
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()
582 static struct htab_elem *lookup_elem_raw(struct hlist_nulls_head *head, u32 hash, in lookup_elem_raw()
586 struct htab_elem *l; in lookup_elem_raw()
599 static struct htab_elem *lookup_nulls_elem_raw(struct hlist_nulls_head *head, in lookup_nulls_elem_raw()
604 struct htab_elem *l; in lookup_nulls_elem_raw()
626 struct htab_elem *l; in __htab_map_lookup_elem()
645 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_map_lookup_elem()
674 offsetof(struct htab_elem, key) + in htab_map_gen_lookup()
682 struct htab_elem *l = __htab_map_lookup_elem(map, key); in __htab_lru_map_lookup_elem()
715 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
719 offsetof(struct htab_elem, lru_node) + in htab_lru_map_gen_lookup()
723 offsetof(struct htab_elem, key) + in htab_lru_map_gen_lookup()
728 static void check_and_free_timer(struct bpf_htab *htab, struct htab_elem *elem) in check_and_free_timer()
742 struct htab_elem *l = NULL, *tgt_l; in htab_lru_map_delete_node()
749 tgt_l = container_of(node, struct htab_elem, lru_node); in htab_lru_map_delete_node()
774 struct htab_elem *l, *next_l; in htab_map_get_next_key()
797 struct htab_elem, hash_node); in htab_map_get_next_key()
816 struct htab_elem, hash_node); in htab_map_get_next_key()
828 static void htab_elem_free(struct bpf_htab *htab, struct htab_elem *l) in htab_elem_free()
838 struct htab_elem *l = container_of(head, struct htab_elem, rcu); in htab_elem_free_rcu()
844 static void htab_put_fd_value(struct bpf_htab *htab, struct htab_elem *l) in htab_put_fd_value()
855 static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l) in free_htab_elem()
919 static struct htab_elem *alloc_htab_elem(struct bpf_htab *htab, void *key, in alloc_htab_elem()
922 struct htab_elem *old_elem) in alloc_htab_elem()
926 struct htab_elem *l_new, **pl_new; in alloc_htab_elem()
944 l_new = container_of(l, struct htab_elem, fnode); in alloc_htab_elem()
1004 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags()
1023 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem()
1115 static void htab_lru_push_free(struct bpf_htab *htab, struct htab_elem *elem) in htab_lru_push_free()
1125 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem()
1193 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem()
1248 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem()
1329 struct htab_elem *l; in htab_map_delete_elem()
1365 struct htab_elem *l; in htab_lru_map_delete_elem()
1403 struct htab_elem *l; in delete_all_elements()
1420 struct htab_elem *l; in htab_free_malloced_timers()
1497 struct htab_elem *l; in __htab_map_lookup_and_delete_elem()
1598 struct htab_elem *node_to_free = NULL; in __htab_map_lookup_and_delete_batch()
1604 struct htab_elem *l; in __htab_map_lookup_and_delete_batch()
1877 static struct htab_elem *
1879 struct htab_elem *prev_elem) in bpf_hash_map_seq_find_next()
1886 struct htab_elem *elem; in bpf_hash_map_seq_find_next()
1899 elem = hlist_nulls_entry_safe(n, struct htab_elem, hash_node); in bpf_hash_map_seq_find_next()
1936 struct htab_elem *elem; in bpf_hash_map_seq_start()
1956 static int __bpf_hash_map_seq_show(struct seq_file *seq, struct htab_elem *elem) in __bpf_hash_map_seq_show()
2058 struct htab_elem *elem; in bpf_for_each_hash_elem()
2156 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_percpu_map_lookup_elem()
2166 struct htab_elem *l = __htab_map_lookup_elem(map, key); in htab_lru_percpu_map_lookup_elem()
2178 struct htab_elem *l; in bpf_percpu_hash_copy()
2229 struct htab_elem *l; in htab_percpu_map_seq_show_elem()
2307 struct htab_elem *l; in fd_htab_map_free()
2402 offsetof(struct htab_elem, key) + in htab_of_map_gen_lookup()