Searched refs:cons_pos (Results 1 – 5 of 5) sorted by relevance
/Linux-v5.10/tools/lib/bpf/ |
D | ringbuf.c | 208 unsigned long cons_pos, prod_pos; in ringbuf_process_ring() local 212 cons_pos = smp_load_acquire(r->consumer_pos); in ringbuf_process_ring() 216 while (cons_pos < prod_pos) { in ringbuf_process_ring() 217 len_ptr = r->data + (cons_pos & r->mask); in ringbuf_process_ring() 225 cons_pos += roundup_len(len); in ringbuf_process_ring() 233 cons_pos); in ringbuf_process_ring() 239 smp_store_release(r->consumer_pos, cons_pos); in ringbuf_process_ring()
|
/Linux-v5.10/kernel/bpf/ |
D | ringbuf.c | 268 unsigned long cons_pos, prod_pos; in ringbuf_avail_data_sz() local 270 cons_pos = smp_load_acquire(&rb->consumer_pos); in ringbuf_avail_data_sz() 272 return prod_pos - cons_pos; in ringbuf_avail_data_sz() 329 unsigned long cons_pos, prod_pos, new_prod_pos, flags; in __bpf_ringbuf_reserve() local 337 cons_pos = smp_load_acquire(&rb->consumer_pos); in __bpf_ringbuf_reserve() 352 if (new_prod_pos - cons_pos > rb->mask) { in __bpf_ringbuf_reserve() 391 unsigned long rec_pos, cons_pos; in bpf_ringbuf_commit() local 409 cons_pos = smp_load_acquire(&rb->consumer_pos) & rb->mask; in bpf_ringbuf_commit() 413 else if (cons_pos == rec_pos && !(flags & BPF_RB_NO_WAKEUP)) in bpf_ringbuf_commit()
|
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/ |
D | ringbuf.c | 116 CHECK(skel->bss->cons_pos != 0, in test_ringbuf() 118 0L, skel->bss->cons_pos); in test_ringbuf() 148 CHECK(skel->bss->cons_pos != 3 * rec_sz, in test_ringbuf() 150 3L * rec_sz, skel->bss->cons_pos); in test_ringbuf()
|
/Linux-v5.10/tools/testing/selftests/bpf/progs/ |
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-v5.10/tools/testing/selftests/bpf/benchs/ |
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()
|