Re: [PATCH v4 2/4] libbpf: ringbuf: allow to consume up to a certain amount of items

2024-04-06 Thread Andrii Nakryiko
On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi wrote: > > In some cases, instead of always consuming all items from ring buffers > in a greedy way, we may want to consume up to a certain amount of items, > for example when we need to copy items from the BPF ring buffer to a > limited user buffer. > >

[PATCH v4 2/4] libbpf: ringbuf: allow to consume up to a certain amount of items

2024-04-06 Thread Andrea Righi
In some cases, instead of always consuming all items from ring buffers in a greedy way, we may want to consume up to a certain amount of items, for example when we need to copy items from the BPF ring buffer to a limited user buffer. This change allows to set an upper limit to the amount of items