]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: teach libbpf about log_level bit 2
authorAlexei Starovoitov <ast@kernel.org>
Tue, 2 Apr 2019 04:27:47 +0000 (21:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 3 Apr 2019 23:27:38 +0000 (01:27 +0200)
commit4a2a09b2a4b3e60f66d8b0bac21581bb13f84e16
tree788118532f64d3e719781ebf2f4ba3fcc679fe14
parentcb38b11542bbb97fe8f1ddb113d456b0ddda531c
libbpf: teach libbpf about log_level bit 2

Allow bpf_prog_load_xattr() to specify log_level for program loading.

Teach libbpf to accept log_level with bit 2 set.

Increase default BPF_LOG_BUF_SIZE from 256k to 16M.
There is no downside to increase it to a maximum allowed by old kernels.
Existing 256k limit caused ENOSPC errors and users were not able to see
verifier error which is printed at the end of the verifier log.

If ENOSPC is hit, double the verifier log and try again to capture
the verifier error.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h