[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9909038f-a005-440a-82f2-ebe2f2da0767@kernel.org>
Date: Fri, 16 May 2025 11:18:33 +0100
From: Quentin Monnet <qmo@...nel.org>
To: Jiayuan Chen <jiayuan.chen@...ux.dev>, bpf@...r.kernel.org
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
<eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Mykyta Yatsenko <yatsenko@...a.com>,
Daniel Xu <dxu@...uu.xyz>, Tao Chen <chen.dylane@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3] bpftool: Add support for custom BTF path in
prog load/loadall
2025-05-16 11:23 UTC+0800 ~ Jiayuan Chen <jiayuan.chen@...ux.dev>
> This patch exposes the btf_custom_path feature to bpftool, allowing users
> to specify a custom BTF file when loading BPF programs using prog load or
> prog loadall commands.
>
> The argument 'btf_custom_path' in libbpf is used for those kernels that
> don't have CONFIG_DEBUG_INFO_BTF enabled but still want to perform CO-RE
> relocations.
>
> Suggested-by: Quentin Monnet <qmo@...nel.org>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@...ux.dev>
>
> ---
> V2 -> V3: Optimized document grammar and some prompts
> https://lore.kernel.org/bpf/20250515065018.240188-1-jiayuan.chen@linux.dev/
> V1 -> V2: Added bash completion and documentation
> https://lore.kernel.org/bpf/20250513035853.75820-1-jiayuan.chen@linux.dev/
> ---
> tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 +++++++-
> tools/bpf/bpftool/bash-completion/bpftool | 4 ++--
> tools/bpf/bpftool/prog.c | 12 +++++++++++-
> 3 files changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> index d6304e01afe0..4dce43e8e8a3 100644
> --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> @@ -127,7 +127,7 @@ bpftool prog pin *PROG* *FILE*
> Note: *FILE* must be located in *bpffs* mount. It must not contain a dot
> character ('.'), which is reserved for future extensions of *bpffs*.
>
> -bpftool prog { load | loadall } *OBJ* *PATH* [type *TYPE*] [map { idx *IDX* | name *NAME* } *MAP*] [{ offload_dev | xdpmeta_dev } *NAME*] [pinmaps *MAP_DIR*] [autoattach]
> +bpftool prog { load | loadall } *OBJ* *PATH* [type *TYPE*] [map { idx *IDX* | name *NAME* } *MAP*] [{ offload_dev | xdpmeta_dev } *NAME*] [pinmaps *MAP_DIR*] [autoattach] [kernel_btf *BTF_FILE*]
Woops, I just realised we also need to add kernel_btf to the command
summary at the top of the document (line 34), sorry for missing it
during the previous pass. Please add it, and mark v4 as:
Reviewed-by: Quentin Monnet <qmo@...nel.org>
Thanks!
Powered by blists - more mailing lists