Home
last modified time | relevance | path

Searched refs:ringbuf (Results 1 – 11 of 11) sorted by relevance

/Linux-v5.10/tools/testing/selftests/bpf/progs/
Dtest_ringbuf.c19 } ringbuf SEC(".maps");
49 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf()
64 bpf_ringbuf_output(&ringbuf, sample, sizeof(*sample), flags); in test_ringbuf()
72 avail_data = bpf_ringbuf_query(&ringbuf, BPF_RB_AVAIL_DATA); in test_ringbuf()
73 ring_size = bpf_ringbuf_query(&ringbuf, BPF_RB_RING_SIZE); in test_ringbuf()
74 cons_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_CONS_POS); in test_ringbuf()
75 prod_pos = bpf_ringbuf_query(&ringbuf, BPF_RB_PROD_POS); in test_ringbuf()
Dringbuf_bench.c12 } ringbuf SEC(".maps");
29 sz = bpf_ringbuf_query(&ringbuf, BPF_RB_AVAIL_DATA); in get_flags()
41 sample = bpf_ringbuf_reserve(&ringbuf, in bench_ringbuf()
54 if (bpf_ringbuf_output(&ringbuf, &sample_val, in bench_ringbuf()
Dmap_ptr_kern.c650 struct bpf_ringbuf_map *ringbuf = (struct bpf_ringbuf_map *)&m_ringbuf; in check_ringbuf() local
653 VERIFY(check(&ringbuf->map, map, 0, 0, 1 << 12)); in check_ringbuf()
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dringbuf_multi.c44 struct ring_buffer *ringbuf; in test_ringbuf_multi() local
54 ringbuf = ring_buffer__new(bpf_map__fd(skel->maps.ringbuf1), in test_ringbuf_multi()
56 if (CHECK(!ringbuf, "ringbuf_create", "failed to create ringbuf\n")) in test_ringbuf_multi()
59 err = ring_buffer__add(ringbuf, bpf_map__fd(skel->maps.ringbuf2), in test_ringbuf_multi()
83 err = ring_buffer__poll(ringbuf, -1); in test_ringbuf_multi()
88 err = ring_buffer__poll(ringbuf, 0); in test_ringbuf_multi()
100 ring_buffer__free(ringbuf); in test_ringbuf_multi()
Dringbuf.c62 static struct ring_buffer *ringbuf; variable
81 return (void *)(long)ring_buffer__poll(ringbuf, timeout); in poll_thread()
98 ringbuf = ring_buffer__new(bpf_map__fd(skel->maps.ringbuf), in test_ringbuf()
100 if (CHECK(!ringbuf, "ringbuf_create", "failed to create ringbuf\n")) in test_ringbuf()
124 err = ring_buffer__poll(ringbuf, -1); in test_ringbuf()
133 err = ring_buffer__poll(ringbuf, 0); in test_ringbuf()
151 err = ring_buffer__poll(ringbuf, -1); in test_ringbuf()
226 err = ring_buffer__consume(ringbuf); in test_ringbuf()
243 ring_buffer__free(ringbuf); in test_ringbuf()
/Linux-v5.10/tools/testing/selftests/bpf/benchs/
Dbench_ringbufs.c124 struct ring_buffer *ringbuf; member
154 bpf_map__resize(skel->maps.ringbuf, args.ringbuf_sz); in ringbuf_setup_skeleton()
176 ctx->ringbuf = ring_buffer__new(bpf_map__fd(ctx->skel->maps.ringbuf), in ringbuf_libbpf_setup()
178 if (!ctx->ringbuf) { in ringbuf_libbpf_setup()
194 while (ring_buffer__poll(ctx->ringbuf, -1) >= 0) { in ringbuf_libbpf_consumer()
213 struct ringbuf_custom ringbuf; member
243 r = &ctx->ringbuf; in ringbuf_custom_setup()
244 r->map_fd = bpf_map__fd(ctx->skel->maps.ringbuf); in ringbuf_custom_setup()
335 ringbuf_custom_process_ring(&ctx->ringbuf); in ringbuf_custom_consumer()
/Linux-v5.10/tools/lib/bpf/
DBuild3 btf_dump.o ringbuf.o
/Linux-v5.10/kernel/bpf/
DMakefile11 obj-$(CONFIG_BPF_SYSCALL) += local_storage.o queue_stack_maps.o ringbuf.o
/Linux-v5.10/Documentation/bpf/
Dindex.rst83 ringbuf
Dringbuf.rst42 Additionally, given the performance of BPF ringbuf, many use cases would just
84 BPF ringbuf provides two sets of APIs to BPF programs:
194 Another feature that distinguishes BPF ringbuf from perf ring buffer is
/Linux-v5.10/tools/bpf/bpftool/Documentation/
Dbpftool-map.rst53 | | **queue** | **stack** | **sk_storage** | **struct_ops** | **ringbuf** | **inode_storage** }