Lines Matching refs:p
122 struct prog_test_ref_kfunc *p; in test_kptr_unref() local
124 p = v->unref_ptr; in test_kptr_unref()
126 WRITE_ONCE(v->unref_ptr, p); in test_kptr_unref()
127 if (!p) in test_kptr_unref()
129 if (p->a + p->b > 100) in test_kptr_unref()
132 WRITE_ONCE(v->unref_ptr, p); in test_kptr_unref()
139 struct prog_test_ref_kfunc *p; in test_kptr_ref() local
141 p = v->ref_ptr; in test_kptr_ref()
143 WRITE_ONCE(v->unref_ptr, p); in test_kptr_ref()
144 if (!p) in test_kptr_ref()
151 bpf_kfunc_call_test_ref(p); in test_kptr_ref()
152 if (p->a + p->b > 100) in test_kptr_ref()
155 p = bpf_kptr_xchg(&v->ref_ptr, NULL); in test_kptr_ref()
156 if (!p) in test_kptr_ref()
162 bpf_kfunc_call_test_ref(p); in test_kptr_ref()
163 if (p->a + p->b > 100) { in test_kptr_ref()
164 bpf_kfunc_call_test_release(p); in test_kptr_ref()
168 WRITE_ONCE(v->unref_ptr, p); in test_kptr_ref()
169 bpf_kfunc_call_test_release(p); in test_kptr_ref()
171 p = bpf_kfunc_call_test_acquire(&(unsigned long){0}); in test_kptr_ref()
172 if (!p) in test_kptr_ref()
175 p = bpf_kptr_xchg(&v->ref_ptr, p); in test_kptr_ref()
176 if (!p) in test_kptr_ref()
178 if (p->a + p->b > 100) { in test_kptr_ref()
179 bpf_kfunc_call_test_release(p); in test_kptr_ref()
182 bpf_kfunc_call_test_release(p); in test_kptr_ref()
298 struct prog_test_ref_kfunc *p, *p_st; in test_map_kptr_ref_pre() local
302 p = bpf_kfunc_call_test_acquire(&arg); in test_map_kptr_ref_pre()
303 if (!p) in test_map_kptr_ref_pre()
307 p_st = p->next; in test_map_kptr_ref_pre()
313 p = bpf_kptr_xchg(&v->ref_ptr, p); in test_map_kptr_ref_pre()
314 if (p) { in test_map_kptr_ref_pre()
321 p = bpf_kptr_xchg(&v->ref_ptr, NULL); in test_map_kptr_ref_pre()
322 if (!p) in test_map_kptr_ref_pre()
324 bpf_kfunc_call_test_release(p); in test_map_kptr_ref_pre()
329 p = bpf_kfunc_call_test_acquire(&arg); in test_map_kptr_ref_pre()
330 if (!p) in test_map_kptr_ref_pre()
333 p = bpf_kptr_xchg(&v->ref_ptr, p); in test_map_kptr_ref_pre()
334 if (p) { in test_map_kptr_ref_pre()
345 bpf_kfunc_call_test_release(p); in test_map_kptr_ref_pre()
352 struct prog_test_ref_kfunc *p, *p_st; in test_map_kptr_ref_post() local
358 p = bpf_kptr_xchg(&v->ref_ptr, NULL); in test_map_kptr_ref_post()
359 if (!p) in test_map_kptr_ref_post()
362 bpf_kfunc_call_test_release(p); in test_map_kptr_ref_post()
366 p = bpf_kptr_xchg(&v->ref_ptr, p); in test_map_kptr_ref_post()
367 if (p) { in test_map_kptr_ref_post()
368 bpf_kfunc_call_test_release(p); in test_map_kptr_ref_post()
464 struct prog_test_ref_kfunc *p; in test_map_kptr_ref3() local
467 p = bpf_kfunc_call_test_acquire(&sp); in test_map_kptr_ref3()
468 if (!p) in test_map_kptr_ref3()
471 if (p->cnt.refs.counter != ref) { in test_map_kptr_ref3()
472 bpf_kfunc_call_test_release(p); in test_map_kptr_ref3()
475 bpf_kfunc_call_test_release(p); in test_map_kptr_ref3()