From: Delyan Kratunov <delyank@fb.com>
To: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>
Cc: "daniel@iogearbox.net" <daniel@iogearbox.net>,
"ast@kernel.org" <ast@kernel.org>,
"andrii@kernel.org" <andrii@kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next 3/4] libbpf: add subskeleton scaffolding
Date: Thu, 3 Mar 2022 19:09:10 +0000 [thread overview]
Message-ID: <af229a64d7f64996c75e6406b146ff00df3e9f5a.camel@fb.com> (raw)
In-Reply-To: <CAEf4BzbHM_5Ytw=bMbw8Lif+EMyyCmvTRt36DnkGB00+ovX26w@mail.gmail.com>
On Wed, 2022-03-02 at 20:34 -0800, Andrii Nakryiko wrote:
> >
>
> forgot to mention, this patch logically probably should go before
> bpftool changes: 1) define types and APIs in libbpf, and only then 2)
> "use" those in bpftool
Sure.
> > >
> > > +struct bpf_sym_skeleton {
> >
> > I tried to get used to this "sym" terminology for a bit, but it still
> > feels off. From user's perspective all this are variables. Any
> > objections to use "var" terminology?
"var" has a specific meaning in btf and I didn't want to make bpf_var_skeleton
look related to btf_var for example. Given the extern usage that libs require, I
figured "sym" would make sense to the user.
If you don't think the confusion with btf_var is significant, I can rename it -
this is all used by generated code anyway.
> >
> > > + const char *name;
> > > + const char *section;
> >
> > what if we store a pointer to struct bpf_map * instead, that way we
> > won't need to search, we'll just have a pointer ready
We'd have to search *somewhere*. I'd rather have the search inside libbpf than
inside the generated code. Besides, finding the right bpf_map from within the
subskeleton is pretty annoying - you'll have to do suffix searches on the
bpf_map names in the passed-in bpf_object and codegening all that is unnecessary
when libbpf can look at real_name.
>
Thanks,
Delyan
next prev parent reply other threads:[~2022-03-03 19:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 2:48 [PATCH bpf-next 0/4] Subskeleton support for BPF libraries Delyan Kratunov
2022-03-02 2:48 ` [PATCH bpf-next 3/4] libbpf: add subskeleton scaffolding Delyan Kratunov
2022-03-02 21:43 ` Daniel Borkmann
2022-03-03 0:20 ` Delyan Kratunov
2022-03-03 0:28 ` Andrii Nakryiko
2022-03-03 0:44 ` Delyan Kratunov
2022-03-03 4:33 ` Andrii Nakryiko
2022-03-03 4:34 ` Andrii Nakryiko
2022-03-03 19:09 ` Delyan Kratunov [this message]
2022-03-04 19:40 ` Andrii Nakryiko
2022-03-02 2:48 ` [PATCH bpf-next 4/4] selftests/bpf: test subskeleton functionality Delyan Kratunov
2022-03-02 22:30 ` Alexei Starovoitov
2022-03-03 0:06 ` Delyan Kratunov
2022-03-03 4:58 ` Andrii Nakryiko
2022-03-02 2:48 ` [PATCH bpf-next 1/4] libbpf: expose map elf section name Delyan Kratunov
2022-03-03 1:13 ` Andrii Nakryiko
2022-03-03 18:19 ` Delyan Kratunov
2022-03-02 2:48 ` [PATCH bpf-next 2/4] bpftool: add support for subskeletons Delyan Kratunov
2022-03-03 1:46 ` Andrii Nakryiko
2022-03-03 18:57 ` Delyan Kratunov
2022-03-03 20:54 ` Delyan Kratunov
2022-03-04 19:29 ` Andrii Nakryiko
2022-03-04 19:29 ` Andrii Nakryiko
2022-03-10 0:09 ` Delyan Kratunov
2022-03-10 0:38 ` Andrii Nakryiko
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=af229a64d7f64996c75e6406b146ff00df3e9f5a.camel@fb.com \
--to=delyank@fb.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/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;
as well as URLs for NNTP newsgroup(s).