Re: [PATCH v3 bpf-next 11/19] libbpf: add "prog_flags" to bpf_program/bpf_prog_load_attr/bpf_load_program_attr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux