Home
last modified time | relevance | path

Searched refs:cons_pos (Results 1 – 5 of 5) sorted by relevance

/linux-6.12.1/kernel/bpf/
Dringbuf.c301 unsigned long cons_pos, prod_pos; in ringbuf_avail_data_sz() local
303 cons_pos = smp_load_acquire(&rb->consumer_pos); in ringbuf_avail_data_sz()
305 return prod_pos - cons_pos; in ringbuf_avail_data_sz()
410 unsigned long cons_pos, prod_pos, new_prod_pos, pend_pos, flags; in __bpf_ringbuf_reserve() local
421 cons_pos = smp_load_acquire(&rb->consumer_pos); in __bpf_ringbuf_reserve()
451 if (new_prod_pos - cons_pos > rb->mask || in __bpf_ringbuf_reserve()
491 unsigned long rec_pos, cons_pos; in bpf_ringbuf_commit() local
509 cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask; in bpf_ringbuf_commit()
513 else if (cons_pos == rec_pos && !(flags & BPF_RB_NO_WAKEUP)) in bpf_ringbuf_commit()
680 u64 cons_pos, prod_pos; in __bpf_user_ringbuf_peek() local
[all …]
/linux-6.12.1/tools/lib/bpf/
Dringbuf.c239 unsigned long cons_pos, prod_pos; in ringbuf_process_ring() local
243 cons_pos = smp_load_acquire(r->consumer_pos); in ringbuf_process_ring()
247 while (cons_pos < prod_pos) { in ringbuf_process_ring()
248 len_ptr = r->data + (cons_pos & r->mask); in ringbuf_process_ring()
256 cons_pos += roundup_len(len); in ringbuf_process_ring()
264 cons_pos); in ringbuf_process_ring()
270 smp_store_release(r->consumer_pos, cons_pos); in ringbuf_process_ring()
389 unsigned long cons_pos, prod_pos; in ring__avail_data_size() local
391 cons_pos = ring__consumer_pos(r); in ring__avail_data_size()
393 return prod_pos - cons_pos; in ring__avail_data_size()
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dringbuf.c151 unsigned long avail_data, ring_size, cons_pos, prod_pos; in ringbuf_subtest() local
237 CHECK(skel->bss->cons_pos != 0, in ringbuf_subtest()
239 0L, skel->bss->cons_pos); in ringbuf_subtest()
251 cons_pos = ring__consumer_pos(ring); in ringbuf_subtest()
252 ASSERT_EQ(cons_pos, 0, "ring_cons_pos"); in ringbuf_subtest()
281 CHECK(skel->bss->cons_pos != 3 * rec_sz, in ringbuf_subtest()
283 3L * rec_sz, skel->bss->cons_pos); in ringbuf_subtest()
/linux-6.12.1/tools/testing/selftests/bpf/progs/
Dtest_ringbuf.c33 long cons_pos = 0; variable
73 cons_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_CONS_POS); in test_ringbuf()
/linux-6.12.1/tools/testing/selftests/bpf/benchs/
Dbench_ringbufs.c297 unsigned long cons_pos, prod_pos; in ringbuf_custom_process_ring() local
301 cons_pos = smp_load_acquire(r->consumer_pos); in ringbuf_custom_process_ring()
305 while (cons_pos < prod_pos) { in ringbuf_custom_process_ring()
306 len_ptr = r->data + (cons_pos & r->mask); in ringbuf_custom_process_ring()
314 cons_pos += roundup_len(len); in ringbuf_custom_process_ring()
319 smp_store_release(r->consumer_pos, cons_pos); in ringbuf_custom_process_ring()