Home
last modified time | relevance | path

Searched hist:"6032 ebb5" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/lib/bpf/
H A Dringbuf.c6032ebb5 Thu Mar 25 10:01:15 CDT 2021 Pedro Tammela <pctammela@gmail.com> libbpf: Fix bail out from 'ringbuf_process_ring()' on error

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.

Fixes: bf99c936f947 ("libbpf: Add BPF ring buffer support")
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210325150115.138750-1-pctammela@mojatatu.com