Re: [PATCH net-next 4/6] tools/lib/bpf: expose bpf_program__set_type()

2017-03-30 Thread Alexei Starovoitov
On 3/30/17 7:48 PM, Wangnan (F) wrote: On 2017/3/31 10:37, Alexei Starovoitov wrote: On 3/30/17 7:33 PM, Wangnan (F) wrote: +void bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type); This makes libbpf.h depend on uapi/linux/bpf.h (because of enum bpf_prog_type), which

Re: [PATCH net-next 4/6] tools/lib/bpf: expose bpf_program__set_type()

2017-03-30 Thread Wangnan (F)
On 2017/3/31 10:37, Alexei Starovoitov wrote: On 3/30/17 7:33 PM, Wangnan (F) wrote: +void bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type); This makes libbpf.h depend on uapi/linux/bpf.h (because of enum bpf_prog_type), which is not always available. What about

Re: [PATCH net-next 4/6] tools/lib/bpf: expose bpf_program__set_type()

2017-03-30 Thread Alexei Starovoitov
On 3/30/17 7:33 PM, Wangnan (F) wrote: +void bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type); This makes libbpf.h depend on uapi/linux/bpf.h (because of enum bpf_prog_type), which is not always available. What about defining another enum inside libbpf.h? how about

Re: [PATCH net-next 4/6] tools/lib/bpf: expose bpf_program__set_type()

2017-03-30 Thread Wangnan (F)
On 2017/3/31 9:31, Alexei Starovoitov wrote: expose bpf_program__set_type() to set program type Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau --- tools/lib/bpf/libbpf.c | 3 +--

[PATCH net-next 4/6] tools/lib/bpf: expose bpf_program__set_type()

2017-03-30 Thread Alexei Starovoitov
expose bpf_program__set_type() to set program type Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau --- tools/lib/bpf/libbpf.c | 3 +-- tools/lib/bpf/libbpf.h | 1 + 2 files changed, 2 insertions(+), 2