Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/bpf: add unlimited rlimit for flow_dissector_load

On our test machine, bpf selftest test_flow_dissector.sh failed
with the following error:
# ./test_flow_dissector.sh
bpffs not mounted. Mounting...
libbpf: failed to create map (name: 'jmp_table'): Operation not permitted
libbpf: failed to load object 'bpf_flow.o'
./flow_dissector_load: bpf_prog_load bpf_flow.o
selftests: test_flow_dissector [FAILED]

Let us increase the rlimit to remove the above map
creation failure.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Yonghong Song and committed by
Daniel Borkmann
b31d30d9 a6b3a3fa

+2
+2
tools/testing/selftests/bpf/flow_dissector_load.c
··· 11 11 #include <bpf/bpf.h> 12 12 #include <bpf/libbpf.h> 13 13 14 + #include "bpf_rlimit.h" 15 + 14 16 const char *cfg_pin_path = "/sys/fs/bpf/flow_dissector"; 15 17 const char *cfg_map_name = "jmp_table"; 16 18 bool cfg_attach = true;