2019-05-23 16:38 UTC+0000 ~ Yonghong Song <yhs@xxxxxx> > > > On 5/23/19 3:54 AM, Quentin Monnet wrote: >> The "-d" option is used to require all logs available for bpftool. So >> far it meant telling libbpf to print even debug-level information. But >> there is another source of info that can be made more verbose: when we >> attemt to load programs with bpftool, we can pass a log_level parameter >> to the verifier in order to control the amount of information that is >> printed to the console. >> >> Reuse the "-d" option to print all information the verifier can tell. At >> this time, this means logs related to BPF_LOG_LEVEL1, BPF_LOG_LEVEL2 and >> BPF_LOG_STATS. As mentioned in the discussion on the first version of >> this set, these macros are internal to the kernel >> (include/linux/bpf_verifier.h) and are not meant to be part of the >> stable user API, therefore we simply use the related constants to print >> whatever we can at this time, without trying to tell users what is >> log_level1 or what is statistics. >> >> Verifier logs are only used when loading programs for now (in the >> future: for loading BTF objects with bpftool?), so bpftool.rst and >> bpftool-prog.rst are the only man pages to get the update. > > The current BTF error log print out at warning level. So by default, > it should print out error logs unless it is suppressed explicitly. Understood, thanks! This is probably something we could change in libbpf, to have it printed for debug log-level even when no error occurred. But bpftool does not support loading BTF just yet anyway, so I suppose it can wait. Thanks for the review! Quentin