* [PATCH v2 bpf-next] libbpf: deprecate btf_ext rec_size APIs
@ 2022-02-01 1:46 Dave Marchevsky
2022-02-01 9:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dave Marchevsky @ 2022-02-01 1:46 UTC (permalink / raw)
To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Dave Marchevsky
btf_ext__{func,line}_info_rec_size functions are used in conjunction
with already-deprecated btf_ext__reloc_{func,line}_info functions. Since
struct btf_ext is opaque to the user it was necessary to expose rec_size
getters in the past.
btf_ext__reloc_{func,line}_info were deprecated in commit 8505e8709b5ee
("libbpf: Implement generalized .BTF.ext func/line info adjustment")
as they're not compatible with support for multiple programs per
section. It was decided[0] that users of these APIs should implement their
own .btf.ext parsing to access this data, in which case the rec_size
getters are unnecessary. So deprecate them from libbpf 0.7.0 onwards.
[0] Closes: https://github.com/libbpf/libbpf/issues/277
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
---
v2: LIBBPF_DEPRECATED_SINCE -> LIBBPF_DEPRECATED to match
reloc_{func,line}_info deprecations [Daniel]
tools/lib/bpf/btf.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h
index 96b44d55db6e..b10729fd830c 100644
--- a/tools/lib/bpf/btf.h
+++ b/tools/lib/bpf/btf.h
@@ -168,8 +168,10 @@ int btf_ext__reloc_line_info(const struct btf *btf,
const struct btf_ext *btf_ext,
const char *sec_name, __u32 insns_cnt,
void **line_info, __u32 *cnt);
-LIBBPF_API __u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
-LIBBPF_API __u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
+LIBBPF_API LIBBPF_DEPRECATED("btf_ext__reloc_func_info is deprecated; write custom func_info parsing to fetch rec_size")
+__u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
+LIBBPF_API LIBBPF_DEPRECATED("btf_ext__reloc_line_info is deprecated; write custom line_info parsing to fetch rec_size")
+__u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
LIBBPF_API int btf__find_str(struct btf *btf, const char *s);
LIBBPF_API int btf__add_str(struct btf *btf, const char *s);
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 bpf-next] libbpf: deprecate btf_ext rec_size APIs
2022-02-01 1:46 [PATCH v2 bpf-next] libbpf: deprecate btf_ext rec_size APIs Dave Marchevsky
@ 2022-02-01 9:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-01 9:00 UTC (permalink / raw)
To: Dave Marchevsky; +Cc: bpf, ast, daniel, andrii
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Mon, 31 Jan 2022 17:46:10 -0800 you wrote:
> btf_ext__{func,line}_info_rec_size functions are used in conjunction
> with already-deprecated btf_ext__reloc_{func,line}_info functions. Since
> struct btf_ext is opaque to the user it was necessary to expose rec_size
> getters in the past.
>
> btf_ext__reloc_{func,line}_info were deprecated in commit 8505e8709b5ee
> ("libbpf: Implement generalized .BTF.ext func/line info adjustment")
> as they're not compatible with support for multiple programs per
> section. It was decided[0] that users of these APIs should implement their
> own .btf.ext parsing to access this data, in which case the rec_size
> getters are unnecessary. So deprecate them from libbpf 0.7.0 onwards.
>
> [...]
Here is the summary with links:
- [v2,bpf-next] libbpf: deprecate btf_ext rec_size APIs
https://git.kernel.org/bpf/bpf-next/c/5ee32ea24ce7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-01 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 1:46 [PATCH v2 bpf-next] libbpf: deprecate btf_ext rec_size APIs Dave Marchevsky
2022-02-01 9:00 ` patchwork-bot+netdevbpf
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.