summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2019-05-25 00:25:19 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-05-25 03:58:37 +0200
commit046561981b948e07df096a8402f9efc80bc784d9 (patch)
treef98a6321e327d3bb2649b2f8854d7106778b9f03 /tools/lib/bpf/libbpf.h
parentbpf: verifier: randomize high 32-bit when BPF_F_TEST_RND_HI32 is set (diff)
downloadlinux-046561981b948e07df096a8402f9efc80bc784d9.tar.xz
linux-046561981b948e07df096a8402f9efc80bc784d9.zip
libbpf: add "prog_flags" to bpf_program/bpf_prog_load_attr/bpf_load_program_attr
libbpf doesn't allow passing "prog_flags" during bpf program load in a couple of load related APIs, "bpf_load_program_xattr", "load_program" and "bpf_prog_load_xattr". It makes sense to allow passing "prog_flags" which is useful for customizing program loading. Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
-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 c5ff00515ce7..5abc2375defd 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -320,6 +320,7 @@ struct bpf_prog_load_attr {
enum bpf_attach_type expected_attach_type;
int ifindex;
int log_level;
+ int prog_flags;
};
LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,