Re: [PATCH v3 2/5] bpf: Simplify bpf_load_program() error handling in the library

2017-02-08 Thread Mickaël Salaün
On 08/02/2017 03:35, Wangnan (F) wrote: > > > On 2017/2/8 4:56, Mickaël Salaün wrote: >> Do not call a second time bpf(2) when a program load failed. > > BPF_PROG_LOAD should success most of the time. Setting log_level to > 0 by default and require log buffer when failure can make it faster > i

Re: [PATCH v3 2/5] bpf: Simplify bpf_load_program() error handling in the library

2017-02-07 Thread Wangnan (F)
On 2017/2/8 4:56, Mickaël Salaün wrote: Do not call a second time bpf(2) when a program load failed. BPF_PROG_LOAD should success most of the time. Setting log_level to 0 by default and require log buffer when failure can make it faster in normal case. Thank you. Signed-off-by: Mickaël Sal

[PATCH v3 2/5] bpf: Simplify bpf_load_program() error handling in the library

2017-02-07 Thread Mickaël Salaün
Do not call a second time bpf(2) when a program load failed. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Wang Nan --- tools/lib/bpf/bpf.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tool