Home
last modified time | relevance | path

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

/linux-6.1.9/kernel/bpf/
Dringbuf.c301 unsigned long cons_pos, prod_pos; in ringbuf_avail_data_sz() local
304 prod_pos = smp_load_acquire(&rb->producer_pos); in ringbuf_avail_data_sz()
305 return prod_pos - cons_pos; in ringbuf_avail_data_sz()
393 unsigned long cons_pos, prod_pos, new_prod_pos, flags; in __bpf_ringbuf_reserve() local
413 prod_pos = rb->producer_pos; in __bpf_ringbuf_reserve()
414 new_prod_pos = prod_pos + len; in __bpf_ringbuf_reserve()
424 hdr = (void *)rb->data + (prod_pos & rb->mask); in __bpf_ringbuf_reserve()
647 u64 cons_pos, prod_pos; in __bpf_user_ringbuf_peek() local
650 prod_pos = smp_load_acquire(&rb->producer_pos); in __bpf_user_ringbuf_peek()
651 if (prod_pos % 8) in __bpf_user_ringbuf_peek()
[all …]
/linux-6.1.9/tools/lib/bpf/
Dringbuf.c232 unsigned long cons_pos, prod_pos; in ringbuf_process_ring() local
239 prod_pos = smp_load_acquire(r->producer_pos); in ringbuf_process_ring()
240 while (cons_pos < prod_pos) { in ringbuf_process_ring()
486 __u64 cons_pos, prod_pos; in user_ring_buffer__reserve() local
498 prod_pos = smp_load_acquire(rb->producer_pos); in user_ring_buffer__reserve()
501 avail_size = max_size - (prod_pos - cons_pos); in user_ring_buffer__reserve()
511 hdr = rb->data + (prod_pos & rb->mask); in user_ring_buffer__reserve()
518 smp_store_release(rb->producer_pos, prod_pos + total_size); in user_ring_buffer__reserve()
520 return (void *)rb->data + ((prod_pos + BPF_RINGBUF_HDR_SZ) & rb->mask); in user_ring_buffer__reserve()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dtest_ringbuf.c34 long prod_pos = 0; variable
75 prod_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_PROD_POS); in test_ringbuf()
/linux-6.1.9/tools/testing/selftests/bpf/benchs/
Dbench_ringbufs.c297 unsigned long cons_pos, prod_pos; in ringbuf_custom_process_ring() local
304 prod_pos = smp_load_acquire(r->producer_pos); in ringbuf_custom_process_ring()
305 while (cons_pos < prod_pos) { in ringbuf_custom_process_ring()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dringbuf.c173 CHECK(skel->bss->prod_pos != 3 * rec_sz, in test_ringbuf()
175 3L * rec_sz, skel->bss->prod_pos); in test_ringbuf()