]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Clean up ringbuf size adjustment implementation
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 10 May 2022 18:51:59 +0000 (11:51 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 May 2022 12:06:29 +0000 (14:06 +0200)
commit994a28511b982b508b59494b563b43e4536785ee
tree776c3ef83ae05684faf8d6c1d50355f0a96bf4a2
parent0a29d3c25ea787c385030d09982d214f56e5f6ef
libbpf: Clean up ringbuf size adjustment implementation

Drop unused iteration variable, move overflow prevention check into the
for loop.

Fixes: ead9e6c5d27c ("libbpf: Automatically fix up BPF_MAP_TYPE_RINGBUF size, if necessary")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220510185159.754299-1-andrii@kernel.org
tools/lib/bpf/libbpf.c