Lines Matching refs:pptr
198 void __percpu *pptr) in htab_elem_set_ptr() argument
200 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr()
271 void __percpu *pptr; in htab_free_elems() local
273 pptr = htab_elem_get_ptr(get_htab_elem(htab, i), in htab_free_elems()
275 free_percpu(pptr); in htab_free_elems()
326 void __percpu *pptr; in prealloc_init() local
328 pptr = bpf_map_alloc_percpu(&htab->map, size, 8, in prealloc_init()
330 if (!pptr) in prealloc_init()
333 pptr); in prealloc_init()
379 struct htab_elem *__percpu *pptr, *l_new; in alloc_extra_elems() local
383 pptr = bpf_map_alloc_percpu(&htab->map, sizeof(struct htab_elem *), 8, in alloc_extra_elems()
385 if (!pptr) in alloc_extra_elems()
394 *per_cpu_ptr(pptr, cpu) = l_new; in alloc_extra_elems()
396 htab->extra_elems = pptr; in alloc_extra_elems()
925 static void pcpu_copy_value(struct bpf_htab *htab, void __percpu *pptr, in pcpu_copy_value() argument
930 memcpy(this_cpu_ptr(pptr), value, htab->map.value_size); in pcpu_copy_value()
936 bpf_long_memcpy(per_cpu_ptr(pptr, cpu), in pcpu_copy_value()
943 static void pcpu_init_value(struct bpf_htab *htab, void __percpu *pptr, in pcpu_init_value() argument
958 bpf_long_memcpy(per_cpu_ptr(pptr, cpu), value, in pcpu_init_value()
961 memset(per_cpu_ptr(pptr, cpu), 0, size); in pcpu_init_value()
964 pcpu_copy_value(htab, pptr, value, onallcpus); in pcpu_init_value()
982 void __percpu *pptr; in alloc_htab_elem() local
1021 pptr = htab_elem_get_ptr(l_new, key_size); in alloc_htab_elem()
1024 pptr = bpf_mem_cache_alloc(&htab->pcpu_ma); in alloc_htab_elem()
1025 if (!pptr) { in alloc_htab_elem()
1030 l_new->ptr_to_pptr = pptr; in alloc_htab_elem()
1031 pptr = *(void **)pptr; in alloc_htab_elem()
1034 pcpu_init_value(htab, pptr, value, onallcpus); in alloc_htab_elem()
1037 htab_elem_set_ptr(l_new, key_size, pptr); in alloc_htab_elem()
1589 void __percpu *pptr; in __htab_map_lookup_and_delete_elem() local
1592 pptr = htab_elem_get_ptr(l, key_size); in __htab_map_lookup_and_delete_elem()
1595 per_cpu_ptr(pptr, cpu), in __htab_map_lookup_and_delete_elem()
1787 void __percpu *pptr; in __htab_map_lookup_and_delete_batch() local
1789 pptr = htab_elem_get_ptr(l, map->key_size); in __htab_map_lookup_and_delete_batch()
1792 per_cpu_ptr(pptr, cpu), size); in __htab_map_lookup_and_delete_batch()
2049 void __percpu *pptr; in __bpf_hash_map_seq_show() local
2063 pptr = htab_elem_get_ptr(elem, map->key_size); in __bpf_hash_map_seq_show()
2066 per_cpu_ptr(pptr, cpu), in __bpf_hash_map_seq_show()
2147 void __percpu *pptr; in bpf_for_each_hash_elem() local
2172 pptr = htab_elem_get_ptr(elem, map->key_size); in bpf_for_each_hash_elem()
2173 val = this_cpu_ptr(pptr); in bpf_for_each_hash_elem()
2292 void __percpu *pptr; in bpf_percpu_hash_copy() local
2309 pptr = htab_elem_get_ptr(l, map->key_size); in bpf_percpu_hash_copy()
2312 per_cpu_ptr(pptr, cpu), size); in bpf_percpu_hash_copy()
2343 void __percpu *pptr; in htab_percpu_map_seq_show_elem() local
2356 pptr = htab_elem_get_ptr(l, map->key_size); in htab_percpu_map_seq_show_elem()
2360 per_cpu_ptr(pptr, cpu), m); in htab_percpu_map_seq_show_elem()