From: Yonghong Song <yonghong.song@linux.dev>
To: Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org
Cc: kernel-team@meta.com
Subject: Re: [PATCH bpf-next 3/5] libbpf: add btf__new_split() API that was declared but not implemented
Date: Tue, 30 Jan 2024 21:30:36 -0800 [thread overview]
Message-ID: <3b4b98dd-64a6-4fbd-bc8f-45006cc0e089@linux.dev> (raw)
In-Reply-To: <20240130193649.3753476-4-andrii@kernel.org>
On 1/30/24 11:36 AM, Andrii Nakryiko wrote:
> Seems like original commit adding split BTF support intended to add
> btf__new_split() API, and even declared it in libbpf.map, but never
> added (trivial) implementation. Fix this.
>
> Fixes: ba451366bf44 ("libbpf: Implement basic split BTF support")
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
The patch LGTM. We did some cross checking between libbpf.map
and the implementation. What things are missing here to
capture missed implementation or LIBBPF_API marking?
Acked-by: Yonghong Song <yonghong.song@linux.dev>
> ---
> tools/lib/bpf/btf.c | 5 +++++
> tools/lib/bpf/libbpf.map | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
> index 95db88b36cf3..845034d15420 100644
> --- a/tools/lib/bpf/btf.c
> +++ b/tools/lib/bpf/btf.c
> @@ -1079,6 +1079,11 @@ struct btf *btf__new(const void *data, __u32 size)
> return libbpf_ptr(btf_new(data, size, NULL));
> }
>
> +struct btf *btf__new_split(const void *data, __u32 size, struct btf *base_btf)
> +{
> + return libbpf_ptr(btf_new(data, size, base_btf));
> +}
> +
> static struct btf *btf_parse_elf(const char *path, struct btf *base_btf,
> struct btf_ext **btf_ext)
> {
> diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
> index d9e1f57534fa..386964f572a8 100644
> --- a/tools/lib/bpf/libbpf.map
> +++ b/tools/lib/bpf/libbpf.map
> @@ -245,7 +245,6 @@ LIBBPF_0.3.0 {
> btf__parse_raw_split;
> btf__parse_split;
> btf__new_empty_split;
> - btf__new_split;
> ring_buffer__epoll_fd;
> } LIBBPF_0.2.0;
>
> @@ -411,5 +410,7 @@ LIBBPF_1.3.0 {
> } LIBBPF_1.2.0;
>
> LIBBPF_1.4.0 {
> + global:
> bpf_token_create;
> + btf__new_split;
> } LIBBPF_1.3.0;
next prev parent reply other threads:[~2024-01-31 5:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 19:36 [PATCH bpf-next 0/5] Libbpf API and memfd_create() fixes Andrii Nakryiko
2024-01-30 19:36 ` [PATCH bpf-next 1/5] libbpf: call memfd_create() syscall directly Andrii Nakryiko
2024-01-31 5:04 ` Yonghong Song
2024-01-30 19:36 ` [PATCH bpf-next 2/5] libbpf: add missing LIBBPF_API annotation to libbpf_set_memlock_rlim API Andrii Nakryiko
2024-01-31 5:16 ` Yonghong Song
2024-01-31 17:09 ` Andrii Nakryiko
2024-01-31 17:23 ` Yonghong Song
2024-01-31 17:37 ` Andrii Nakryiko
2024-01-30 19:36 ` [PATCH bpf-next 3/5] libbpf: add btf__new_split() API that was declared but not implemented Andrii Nakryiko
2024-01-31 5:30 ` Yonghong Song [this message]
2024-01-31 17:20 ` Andrii Nakryiko
2024-01-31 17:27 ` Yonghong Song
2024-01-30 19:36 ` [PATCH bpf-next 4/5] libbpf: add missed btf_ext__raw_data() API Andrii Nakryiko
2024-01-31 7:39 ` Yonghong Song
2024-01-30 19:36 ` [PATCH bpf-next 5/5] selftests/bpf: fix bench runner SIGSEGV Andrii Nakryiko
2024-01-31 7:41 ` Yonghong Song
2024-01-31 17:17 ` Andrii Nakryiko
2024-01-31 17:25 ` 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=3b4b98dd-64a6-4fbd-bc8f-45006cc0e089@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.