Home
last modified time | relevance | path

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

/linux-6.3-rc2/kernel/bpf/
A 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()
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()
656 if (cons_pos >= prod_pos) in __bpf_user_ringbuf_peek()
[all …]
/linux-6.3-rc2/tools/lib/bpf/
A 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.3-rc2/tools/testing/selftests/bpf/progs/
A Dtest_ringbuf.c34 long prod_pos = 0; variable
75 prod_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_PROD_POS); in test_ringbuf()
/linux-6.3-rc2/tools/testing/selftests/bpf/benchs/
A 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.3-rc2/tools/testing/selftests/bpf/prog_tests/
A Dringbuf.c175 CHECK(skel->bss->prod_pos != 3 * rec_sz, in ringbuf_subtest()
177 3L * rec_sz, skel->bss->prod_pos); in ringbuf_subtest()

Completed in 31 milliseconds