On Thu, Apr 25, 2024 at 11:47:07AM -0700, Andrii Nakryiko wrote:
> On Thu, Apr 25, 2024 at 7:06 AM Andrea Righi
> wrote:
> >
> > Add a testcase for the ring_buffer__consume_n() API.
> >
> > The test produces multiple samples in a ring buffer, using a
> > sy
/lkml/CAEf4BzaR4zqUpDmj44KNLdpJ=tpa97grvzuzvno5nm6b7ow...@mail.gmail.com
Signed-off-by: Andrea Righi
---
tools/testing/selftests/bpf/Makefile | 2 +-
.../selftests/bpf/prog_tests/ringbuf.c| 64 +++
.../selftests/bpf/progs/test_ringbuf_n.c | 47 ++
3
On Thu, Apr 25, 2024 at 02:23:30PM +0200, Jiri Olsa wrote:
> On Thu, Apr 25, 2024 at 08:19:04AM +0200, Andrea Righi wrote:
> > On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote:
> > ...
> > > > static struct test_ringbuf_map_key_lskel *skel_map_
/lkml/CAEf4BzaR4zqUpDmj44KNLdpJ=tpa97grvzuzvno5nm6b7ow...@mail.gmail.com
Signed-off-by: Andrea Righi
---
tools/testing/selftests/bpf/Makefile | 2 +-
.../selftests/bpf/prog_tests/ringbuf.c| 64 +++
.../selftests/bpf/progs/test_ringbuf_n.c | 47 ++
3
syscall(__NR_getpgid);
> > +
> > + /* Consume all samples from the ring buffer in batches of N_SAMPLES */
> > + for (i = 0; i < N_TOT_SAMPLES; i += err) {
> > + err = ring_buffer__consume_n(ringbuf, N_SAMPLES);
> > + ASSERT_EQ(err, N_SAMPLES, &
/lkml/CAEf4BzaR4zqUpDmj44KNLdpJ=tpa97grvzuzvno5nm6b7ow...@mail.gmail.com
Signed-off-by: Andrea Righi
---
tools/testing/selftests/bpf/Makefile | 2 +-
.../selftests/bpf/prog_tests/ringbuf.c| 65 +++
.../selftests/bpf/progs/test_ringbuf_n.c | 52
On Sat, Apr 06, 2024 at 10:52:10AM -0700, Andrii Nakryiko wrote:
> On Sat, Apr 6, 2024 at 10:39 AM Andrii Nakryiko
> wrote:
> >
> > On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi
> > wrote:
> > >
> > > Add tests for new API ring__consume_n() and ring_buff
Add tests for new API ring__consume_n() and ring_buffer__consume_n().
Signed-off-by: Andrea Righi
---
tools/testing/selftests/bpf/prog_tests/ringbuf.c | 8
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf.c
b/tools/testing/selftests/bpf
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.
Link:
https://lore.kernel.org/lkml/20240310154726.734289-1-andrea.ri...@canonical.com/T
Signed-off-by: Andrea Righi
---
tools/lib/bpf/libbpf.h
consumed
from one or more ring buffers.
Signed-off-by: Andrea Righi
---
tools/lib/bpf/ringbuf.c | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tools/lib/bpf/ringbuf.c b/tools/lib/bpf/ringbuf.c
index aacb64278a01..2c4031168413 100644
--- a/tools/lib
- open a new 1.5.0 cycle
v3:
- rename ring__consume_max() -> ring__consume_n() and
ring_buffer__consume_max() -> ring_buffer__consume_n()
- add new API to a new 1.5.0 cycle
- fixed minor nits / comments
v2:
- introduce a new API instead of changing the callback's retcode
behav
Bump libbpf.map to v1.5.0 to start a new libbpf version cycle.
Signed-off-by: Andrea Righi
---
tools/lib/bpf/libbpf.map | 3 +++
tools/lib/bpf/libbpf_version.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
index
12 matches
Mail list logo