Searched refs:cons_pos (Results 1 – 5 of 5) sorted by relevance
/openbmc/linux/kernel/bpf/ |
H 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() 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 …]
|
/openbmc/linux/tools/lib/bpf/ |
H 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()
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | test_ringbuf.c | 33 long cons_pos = 0; variable 73 cons_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_CONS_POS); in test_ringbuf()
|
/openbmc/linux/tools/testing/selftests/bpf/benchs/ |
H 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()
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H 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()
|