]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Fix strict mode calculation
authorMauricio Vásquez <mauricio@kinvolk.io>
Mon, 7 Feb 2022 14:50:51 +0000 (09:50 -0500)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 7 Feb 2022 20:12:22 +0000 (12:12 -0800)
commit2baaec43026b00efb8cc418bffa7615bdc76d958
treed5b193dcb48ee5a22d32d70842963e0b2e5bd8ef
parent4f2d00a2f14fb1703b427700bf415e7629a69a9b
bpftool: Fix strict mode calculation

"(__LIBBPF_STRICT_LAST - 1) & ~LIBBPF_STRICT_MAP_DEFINITIONS" is wrong
as it is equal to 0 (LIBBPF_STRICT_NONE). Let's use
"LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS" now that the
previous commit makes it possible in libbpf.

Fixes: b2fb7b7a9e21 ("libbpf: deprecate legacy BPF map definitions")
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220207145052.124421-3-mauricio@kinvolk.io
tools/bpf/bpftool/main.c