]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Do not check return value from libbpf_set_strict_mode()
authorQuentin Monnet <quentin@isovalent.com>
Fri, 10 Jun 2022 11:26:48 +0000 (12:26 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 14 Jun 2022 20:18:56 +0000 (22:18 +0200)
commita7a6e7b21f1010729feece86dae582111e773640
tree31c9db9516aa2815fdd5e3acdaeb55658ee67c58
parent374bf573cd111bc7df8094cac7e34cd84a5548a6
bpftool: Do not check return value from libbpf_set_strict_mode()

The function always returns 0, so we don't need to check whether the
return value is 0 or not.

This change was first introduced in commit b12322bdd4f7 ("bpftool: Use
libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"), but later reverted to
restore the unconditional rlimit bump in bpftool. Let's re-add it.

Co-developed-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220610112648.29695-3-quentin@isovalent.com
tools/bpf/bpftool/main.c