From: Alexei Starovoitov <ast@fb.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Martin KaFai Lau <kafai@fb.com>
Cc: Wang Nan <wangnan0@huawei.com>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH/RFC] Re: 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name"
Date: Thu, 30 Nov 2017 13:51:15 -0800 [thread overview]
Message-ID: <312f7691-cb7a-5c2f-18c6-ab26cfaa26a6@fb.com> (raw)
In-Reply-To: <20171130190042.GQ3298@kernel.org>
On 11/30/17 11:00 AM, Arnaldo Carvalho de Melo wrote:
>> Instead of sinking all future bpf_attr's backward compatibility
>> requirements to sys_bpf, I would push it up to its own BPF_* command
>> helper which has a better sense of its bpf_attr, i.e. push it up
>> to bpf_create_map_node() and bpf_load_program_name() in this case.
> Humm, we could try that approach, but the one in this patch seemed good
> enough.
>
> And after all if the first syscall() invokation, with the latest kernel
> and latest tooling will work, right?
I agree with Martin and I also don't think it will work to push
logic of all bpf commands into single sys_bpf syscall wrapper.
This logic will become more and more complex over time.
Like this case really belongs in bpf_create_map() which is a wrapper
on top of single BPF_CREATE_MAP command.
Note it's the first time we're facing this
'new libbpf.a running on top of old kernel' issue and should be
very careful adding such fallback code to the generic bpf library,
since all the selftests/bpf/ are using this lib and relying on
excepted behavior. We don't want tests that want to test the latest
kernel feature all of a sudden pass on old kernel that doesn't have it.
To some degree perf and selftests/bpf needs are diverging here,
so adding #ifdef to libbpf.a to match testcase expectations may be
necessary.
next prev parent reply other threads:[~2017-11-30 21:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 19:05 Arnaldo Carvalho de Melo
2017-11-29 21:07 ` Martin KaFai Lau
2017-11-29 21:15 ` Arnaldo Carvalho de Melo
2017-11-29 22:31 ` Martin KaFai Lau
2017-11-30 3:01 ` Arnaldo Carvalho de Melo
2017-11-30 16:53 ` [PATCH/RFC] " Arnaldo Carvalho de Melo
2017-11-30 18:28 ` Martin KaFai Lau
2017-11-30 19:00 ` Arnaldo Carvalho de Melo
2017-11-30 21:51 ` Alexei Starovoitov [this message]
2017-12-01 17:51 ` Arnaldo Carvalho de Melo
2017-12-02 1:15 ` Alexei Starovoitov
2017-11-30 22:09 ` Martin KaFai Lau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=312f7691-cb7a-5c2f-18c6-ab26cfaa26a6@fb.com \
--to=ast@fb.com \
--cc=acme@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®