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 v2 5/5] selftests/bpf: test subskeleton functionality
Date: Mon, 14 Mar 2022 23:50:51 +0000 [thread overview]
Message-ID: <2636cbb9d5207841340d7b17d893227c1576c982.camel@fb.com> (raw)
In-Reply-To: <CAEf4BzaVt=+g2gKpMqsNH5JGSvEJnjnDHW7ueFFgcUtBv1z01Q@mail.gmail.com>
On Fri, 2022-03-11 at 15:40 -0800, Andrii Nakryiko wrote:
>
> we shouldn't need or use name for subskeleton (in real life you won't
> know the name of the final bpf_object)
Let's have this discussion in the bpftool email thread. Happy to remove the name
in the Makefile and fall back on the filename though.
> >
> > $(TRUNNER_BPF_LSKELS): %.lskel.h: %.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
> > $$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
> > @@ -421,6 +428,7 @@ $(TRUNNER_BPF_SKELS_LINKED): $(TRUNNER_BPF_OBJS) $(BPFTOOL) | $(TRUNNER_OUTPUT)
> > $(Q)diff $$(@:.skel.h=.linked2.o) $$(@:.skel.h=.linked3.o)
> > $$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
> > $(Q)$$(BPFTOOL) gen skeleton $$(@:.skel.h=.linked3.o) name $$(notdir $$(@:.skel.h=)) > $$@
> > + $(Q)$$(BPFTOOL) gen subskeleton $$(@:.skel.h=.linked3.o) name $$(notdir $$(@:.skel.h=)) > $$(@:.skel.h=.subskel.h)
>
> probably don't need subskel for LSKELS (and it just adds race when we
> generate both skeleton and light skeleton for the same object file)
We're not generating subskels for LSKELS, that's just confusing diff output.
This is under the $(TRUNNER_BPF_SKELS_LINKED) outputs.
>
> can you please add CONFIG_BPF_SYSCALL here as well, to check that
> externs are properly "merged" and found, even if they overlap between
> library and app BPF code
Sure.
>
> libbpf supports .data.my_custom_name and .rodata.my_custom_whatever,
> let's have a variable to test this also works?
Sure.
>
> let's move this into progs/test_subskeleton.c instead. It will
> simulate a bit more complicated scenario, where library expects
> application to define and provide a map, but the library itself
> doesn't define it. It should work just fine right now (I think), but
> just in case let's double check that having only "extern map" in the
> library works.
This fails to even open in bpftool:
libbpf: map 'map2': unsupported map linkage extern.
Error: failed to open BPF object file: Operation not supported
If we think this is valuable enough to support, let's tackle it separately after
the bulk of this functionality is merged?
-- Delyan
next prev parent reply other threads:[~2022-03-14 23:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 0:11 [PATCH bpf-next v2 0/5] Subskeleton support for BPF libraries Delyan Kratunov
2022-03-11 0:11 ` [PATCH bpf-next v2 1/5] libbpf: add new strict flag for .text subprograms Delyan Kratunov
2022-03-11 22:30 ` Andrii Nakryiko
2022-03-11 0:11 ` [PATCH bpf-next v2 2/5] libbpf: init btf_{key,value}_type_id on internal map open Delyan Kratunov
2022-03-11 22:42 ` Andrii Nakryiko
2022-03-11 0:11 ` [PATCH bpf-next v2 3/5] libbpf: add subskeleton scaffolding Delyan Kratunov
2022-03-11 22:52 ` Andrii Nakryiko
2022-03-11 23:08 ` Andrii Nakryiko
2022-03-11 23:28 ` Delyan Kratunov
2022-03-11 23:41 ` Andrii Nakryiko
2022-03-11 0:11 ` [PATCH bpf-next v2 4/5] bpftool: add support for subskeletons Delyan Kratunov
2022-03-11 23:27 ` Andrii Nakryiko
2022-03-14 23:18 ` Delyan Kratunov
2022-03-15 17:28 ` Delyan Kratunov
2022-03-15 18:07 ` Andrii Nakryiko
2022-03-15 18:07 ` Andrii Nakryiko
2022-03-11 0:12 ` [PATCH bpf-next v2 5/5] selftests/bpf: test subskeleton functionality Delyan Kratunov
2022-03-11 23:40 ` Andrii Nakryiko
2022-03-14 23:50 ` Delyan Kratunov [this message]
2022-03-15 18:31 ` Andrii Nakryiko
2022-03-11 5:10 ` [PATCH bpf-next v2 0/5] Subskeleton support for BPF libraries Yonghong Song
2022-03-11 18:18 ` Delyan Kratunov
2022-03-12 0:39 ` Yonghong Song
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=2636cbb9d5207841340d7b17d893227c1576c982.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