summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-04-01 21:27:47 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-04-04 01:27:38 +0200
commitda11b417583ece875f862d84578259a2ab27ad86 (patch)
tree788118532f64d3e719781ebf2f4ba3fcc679fe14 /tools/lib/bpf/libbpf.h
parent7a9f5c65abcc9644b11738ca0815510cb5510eaf (diff)
downloadlinux-da11b417583ece875f862d84578259a2ab27ad86.tar.gz
linux-da11b417583ece875f862d84578259a2ab27ad86.tar.bz2
linux-da11b417583ece875f862d84578259a2ab27ad86.zip
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>
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r--tools/lib/bpf/libbpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index c70785cc8ef5..531323391d07 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -314,6 +314,7 @@ struct bpf_prog_load_attr {
enum bpf_prog_type prog_type;
enum bpf_attach_type expected_attach_type;
int ifindex;
+ int log_level;
};
LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,