[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <698c672e-f818-4b66-ebfc-e0b33964dec0@netronome.com>
Date: Fri, 24 May 2019 10:47:02 +0100
From: Quentin Monnet <quentin.monnet@...ronome.com>
To: Yonghong Song <yhs@...com>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Cc: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"oss-drivers@...ronome.com" <oss-drivers@...ronome.com>
Subject: Re: [PATCH bpf-next v2 2/3] libbpf: add bpf_object__load_xattr() API
function to pass log_level
2019-05-23 16:29 UTC+0000 ~ Yonghong Song <yhs@...com>
>
>
> 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
Powered by blists - more mailing lists