aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r--tools/lib/bpf/libbpf.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index c5ff00515ce7..1af0d48178c8 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -89,8 +89,14 @@ LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
89LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path); 89LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
90LIBBPF_API void bpf_object__close(struct bpf_object *object); 90LIBBPF_API void bpf_object__close(struct bpf_object *object);
91 91
92struct bpf_object_load_attr {
93 struct bpf_object *obj;
94 int log_level;
95};
96
92/* Load/unload object into/from kernel */ 97/* Load/unload object into/from kernel */
93LIBBPF_API int bpf_object__load(struct bpf_object *obj); 98LIBBPF_API int bpf_object__load(struct bpf_object *obj);
99LIBBPF_API int bpf_object__load_xattr(struct bpf_object_load_attr *attr);
94LIBBPF_API int bpf_object__unload(struct bpf_object *obj); 100LIBBPF_API int bpf_object__unload(struct bpf_object *obj);
95LIBBPF_API const char *bpf_object__name(struct bpf_object *obj); 101LIBBPF_API const char *bpf_object__name(struct bpf_object *obj);
96LIBBPF_API unsigned int bpf_object__kversion(struct bpf_object *obj); 102LIBBPF_API unsigned int bpf_object__kversion(struct bpf_object *obj);
@@ -320,6 +326,7 @@ struct bpf_prog_load_attr {
320 enum bpf_attach_type expected_attach_type; 326 enum bpf_attach_type expected_attach_type;
321 int ifindex; 327 int ifindex;
322 int log_level; 328 int log_level;
329 int prog_flags;
323}; 330};
324 331
325LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr, 332LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,