Lines Matching refs:pptr
195 void __percpu *pptr) in htab_elem_set_ptr() argument
197 *(void __percpu **)(l->key + key_size) = pptr; in htab_elem_set_ptr()
253 void __percpu *pptr = htab_elem_get_ptr(elem, htab->map.key_size); in htab_free_prealloced_fields() local
257 bpf_obj_free_fields(htab->map.record, per_cpu_ptr(pptr, cpu)); in htab_free_prealloced_fields()
276 void __percpu *pptr; in htab_free_elems() local
278 pptr = htab_elem_get_ptr(get_htab_elem(htab, i), in htab_free_elems()
280 free_percpu(pptr); in htab_free_elems()
332 void __percpu *pptr; in prealloc_init() local
334 pptr = bpf_map_alloc_percpu(&htab->map, size, 8, in prealloc_init()
336 if (!pptr) in prealloc_init()
339 pptr); in prealloc_init()
385 struct htab_elem *__percpu *pptr, *l_new; in alloc_extra_elems() local
389 pptr = bpf_map_alloc_percpu(&htab->map, sizeof(struct htab_elem *), 8, in alloc_extra_elems()
391 if (!pptr) in alloc_extra_elems()
400 *per_cpu_ptr(pptr, cpu) = l_new; in alloc_extra_elems()
402 htab->extra_elems = pptr; in alloc_extra_elems()
777 void __percpu *pptr = htab_elem_get_ptr(elem, htab->map.key_size); in check_and_free_fields() local
781 bpf_obj_free_fields(htab->map.record, per_cpu_ptr(pptr, cpu)); in check_and_free_fields()
944 static void pcpu_copy_value(struct bpf_htab *htab, void __percpu *pptr, in pcpu_copy_value() argument
949 copy_map_value(&htab->map, this_cpu_ptr(pptr), value); in pcpu_copy_value()
955 copy_map_value_long(&htab->map, per_cpu_ptr(pptr, cpu), value + off); in pcpu_copy_value()
961 static void pcpu_init_value(struct bpf_htab *htab, void __percpu *pptr, in pcpu_init_value() argument
975 copy_map_value_long(&htab->map, per_cpu_ptr(pptr, cpu), value); in pcpu_init_value()
977 zero_map_value(&htab->map, per_cpu_ptr(pptr, cpu)); in pcpu_init_value()
980 pcpu_copy_value(htab, pptr, value, onallcpus); in pcpu_init_value()
998 void __percpu *pptr; in alloc_htab_elem() local
1038 pptr = htab_elem_get_ptr(l_new, key_size); in alloc_htab_elem()
1041 pptr = bpf_mem_cache_alloc(&htab->pcpu_ma); in alloc_htab_elem()
1042 if (!pptr) { in alloc_htab_elem()
1047 l_new->ptr_to_pptr = pptr; in alloc_htab_elem()
1048 pptr = *(void **)pptr; in alloc_htab_elem()
1051 pcpu_init_value(htab, pptr, value, onallcpus); in alloc_htab_elem()
1054 htab_elem_set_ptr(l_new, key_size, pptr); in alloc_htab_elem()
1605 void __percpu *pptr; in __htab_map_lookup_and_delete_elem() local
1608 pptr = htab_elem_get_ptr(l, key_size); in __htab_map_lookup_and_delete_elem()
1610 copy_map_value_long(&htab->map, value + off, per_cpu_ptr(pptr, cpu)); in __htab_map_lookup_and_delete_elem()
1802 void __percpu *pptr; in __htab_map_lookup_and_delete_batch() local
1804 pptr = htab_elem_get_ptr(l, map->key_size); in __htab_map_lookup_and_delete_batch()
1806 copy_map_value_long(&htab->map, dst_val + off, per_cpu_ptr(pptr, cpu)); in __htab_map_lookup_and_delete_batch()
2064 void __percpu *pptr; in __bpf_hash_map_seq_show() local
2078 pptr = htab_elem_get_ptr(elem, map->key_size); in __bpf_hash_map_seq_show()
2081 per_cpu_ptr(pptr, cpu)); in __bpf_hash_map_seq_show()
2162 void __percpu *pptr; in bpf_for_each_hash_elem() local
2187 pptr = htab_elem_get_ptr(elem, map->key_size); in bpf_for_each_hash_elem()
2188 val = this_cpu_ptr(pptr); in bpf_for_each_hash_elem()
2347 void __percpu *pptr; in bpf_percpu_hash_copy() local
2364 pptr = htab_elem_get_ptr(l, map->key_size); in bpf_percpu_hash_copy()
2366 copy_map_value_long(map, value + off, per_cpu_ptr(pptr, cpu)); in bpf_percpu_hash_copy()
2398 void __percpu *pptr; in htab_percpu_map_seq_show_elem() local
2411 pptr = htab_elem_get_ptr(l, map->key_size); in htab_percpu_map_seq_show_elem()
2415 per_cpu_ptr(pptr, cpu), m); in htab_percpu_map_seq_show_elem()