2019-05-23 16:29 UTC+0000 ~ Yonghong Song <yhs@xxxxxx> > > > On 5/23/19 9:19 AM, Yonghong Song wrote: >> >> >> On 5/23/19 3:54 AM, Quentin Monnet wrote: >>> libbpf was recently made aware of the log_level attribute for programs, >>> used to specify the level of information expected to be dumped by the >>> verifier. >>> >>> Create an API function to pass additional attributes when loading a >>> bpf_object, so we can set this log_level value in programs when loading >>> them, and so that so that applications relying on libbpf but not calling >> "so that so that" => "so that" Oh, thanks! >>> bpf_prog_load_xattr() can also use that feature. >> >> Do not fully understand the above statement. From the code below, >> I did not see how the non-zero log_level can be set for bpf_program >> without bpf_prog_load_xattr(). Maybe I miss something? bpf_prog_load_xattr() already had support for passing a log_level, it was added by Alexei when he made libbpf aware of the different log levels (commit da11b417583e). But bpftool does not rely on bpf_prog_load_xattr(), it loads programs with bpf_object__load(), that offered no way pass a log_level parameter. Does that help? > > Looks like next patch uses it when -d is specified. It uses the new bpf_object__load_xattr() function introduced in this patch indeed. > Probably commit message can be made more clear. Yeah, probably. I'll improve it and submit a v3. Thanks! Quentin