From: Pedro Tammela <hidden> Date: 2021-03-25 15:02:59
The current code bails out with negative and positive returns.
If the callback returns a positive return code, 'ring_buffer__consume()'
and 'ring_buffer__poll()' will return a spurious number of records
consumed, but mostly important will continue the processing loop.
This patch makes positive returns from the callback a no-op.
Signed-off-by: Pedro Tammela <redacted>
---
tools/lib/bpf/ringbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Thu, Mar 25, 2021 at 8:02 AM Pedro Tammela [off-list ref] wrote:
The current code bails out with negative and positive returns.
If the callback returns a positive return code, 'ring_buffer__consume()'
and 'ring_buffer__poll()' will return a spurious number of records
consumed, but mostly important will continue the processing loop.
This patch makes positive returns from the callback a no-op.
Signed-off-by: Pedro Tammela <redacted>
---
tools/lib/bpf/ringbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Thanks. Applied to bpf tree and added:
Fixes: bf99c936f947 ("libbpf: Add BPF ring buffer support")