diff options
author | Andrea Righi <andrea.righi@canonical.com> | 2024-04-06 11:15:43 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-04-06 18:11:55 +0200 |
commit | 4d22ea94ea33550538b3b14429d52cb9f96ad2c3 (patch) | |
tree | be1f6764f6ef5a655bb0d2e5d60bf7c99659a9ae /tools/lib/bpf/libbpf.map | |
parent | libbpf: ringbuf: Allow to consume up to a certain amount of items (diff) | |
download | linux-4d22ea94ea33550538b3b14429d52cb9f96ad2c3.tar.xz linux-4d22ea94ea33550538b3b14429d52cb9f96ad2c3.zip |
libbpf: Add ring__consume_n / ring_buffer__consume_n
Introduce a new API to consume items from a ring buffer, limited to a
specified amount, and return to the caller the actual number of items
consumed.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/lkml/20240310154726.734289-1-andrea.righi@canonical.com/T
Link: https://lore.kernel.org/bpf/20240406092005.92399-4-andrea.righi@canonical.com
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index 5dd81a7b96b5..23d82bba021a 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -418,4 +418,7 @@ LIBBPF_1.4.0 { } LIBBPF_1.3.0; LIBBPF_1.5.0 { + global: + ring__consume_n; + ring_buffer__consume_n; } LIBBPF_1.4.0; |