Searched refs:cons_pos (Results 1 – 5 of 5) sorted by relevance
/linux-6.3-rc2/kernel/bpf/ |
A D | ringbuf.c | 301 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() 393 unsigned long cons_pos, prod_pos, new_prod_pos, flags; in __bpf_ringbuf_reserve() local 404 cons_pos = smp_load_acquire(&rb->consumer_pos); in __bpf_ringbuf_reserve() 419 if (new_prod_pos - cons_pos > rb->mask) { in __bpf_ringbuf_reserve() 458 unsigned long rec_pos, cons_pos; in bpf_ringbuf_commit() local 647 u64 cons_pos, prod_pos; in __bpf_user_ringbuf_peek() local 655 cons_pos = smp_load_acquire(&rb->consumer_pos); 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 D | ringbuf.c | 232 unsigned long cons_pos, prod_pos; in ringbuf_process_ring() local 236 cons_pos = smp_load_acquire(r->consumer_pos); in ringbuf_process_ring() 240 while (cons_pos < prod_pos) { in ringbuf_process_ring() 241 len_ptr = r->data + (cons_pos & r->mask); in ringbuf_process_ring() 249 cons_pos += roundup_len(len); in ringbuf_process_ring() 257 cons_pos); in ringbuf_process_ring() 263 smp_store_release(r->consumer_pos, cons_pos); in ringbuf_process_ring() 486 __u64 cons_pos, prod_pos; in user_ring_buffer__reserve() local 496 cons_pos = smp_load_acquire(rb->consumer_pos); in user_ring_buffer__reserve() 501 avail_size = max_size - (prod_pos - cons_pos); in user_ring_buffer__reserve()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | test_ringbuf.c | 33 long cons_pos = 0; variable 74 cons_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_CONS_POS); in test_ringbuf()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/benchs/ |
A D | bench_ringbufs.c | 297 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()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/ |
A D | ringbuf.c | 172 CHECK(skel->bss->cons_pos != 0, in ringbuf_subtest() 174 0L, skel->bss->cons_pos); in ringbuf_subtest() 204 CHECK(skel->bss->cons_pos != 3 * rec_sz, in ringbuf_subtest() 206 3L * rec_sz, skel->bss->cons_pos); in ringbuf_subtest()
|
Completed in 10 milliseconds