On Fri, 12 Apr 2019 22:59:44 +0100, Jiong Wang wrote: > 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. > > Signed-off-by: Jiong Wang <jiong.wang@xxxxxxxxxxxxx> Reviewed-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx> Thanks! > diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h > index c5ff005..5abc237 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; nit: __u32 or other unsigned type here? > }; > > LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,