tools/bpf: add unlimited rlimit for flow_dissector_load
authorYonghong Song <yhs@fb.com>
Mon, 29 Oct 2018 21:56:48 +0000 (14:56 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 30 Oct 2018 22:31:21 +0000 (23:31 +0100)
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>
tools/testing/selftests/bpf/flow_dissector_load.c

index d3273b5b3173e123d087c624a34f5b834395da54..ae8180b11d5fe6dde18f822a262405e07479bc68 100644 (file)
@@ -11,6 +11,8 @@
 #include <bpf/bpf.h>
 #include <bpf/libbpf.h>
 
+#include "bpf_rlimit.h"
+
 const char *cfg_pin_path = "/sys/fs/bpf/flow_dissector";
 const char *cfg_map_name = "jmp_table";
 bool cfg_attach = true;