BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version
@ 2024-03-20  1:34 Quentin Monnet
  2024-03-20  6:19 ` Alexei Starovoitov
  2024-03-20  6:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Quentin Monnet @ 2024-03-20  1:34 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	bpf, Quentin Monnet

Commit d510296d331a ("bpftool: Use syscall/loader program in "prog load"
and "gen skeleton" command.") added new files to the list of objects to
compile in order to build the bootstrap version of bpftool. As far as I
can tell, these objects are unnecessary and were added by mistake; maybe
a draft version intended to add support for loading loader programs from
the bootstrap version. Anyway, we can remove these object files from the
list to make the bootstrap bpftool binary a tad smaller and faster to
build.

Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.")
Signed-off-by: Quentin Monnet <qmo@kernel.org>
---
 tools/bpf/bpftool/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index e9154ace80ff..00c704423539 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -183,7 +183,7 @@ HOST_CFLAGS = $(subst -I$(LIBBPF_INCLUDE),-I$(LIBBPF_BOOTSTRAP_INCLUDE),\
 
 BPFTOOL_BOOTSTRAP := $(BOOTSTRAP_OUTPUT)bpftool
 
-BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o xlated_dumper.o btf_dumper.o disasm.o)
+BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o)
 $(BOOTSTRAP_OBJS): $(LIBBPF_BOOTSTRAP)
 
 OBJS = $(patsubst %.c,$(OUTPUT)%.o,$(SRCS)) $(OUTPUT)disasm.o
@@ -231,9 +231,6 @@ endif
 
 CFLAGS += $(if $(BUILD_BPF_SKELS),,-DBPFTOOL_WITHOUT_SKELETONS)
 
-$(BOOTSTRAP_OUTPUT)disasm.o: $(srctree)/kernel/bpf/disasm.c
-	$(QUIET_CC)$(HOSTCC) $(HOST_CFLAGS) -c -MMD $< -o $@
-
 $(OUTPUT)disasm.o: $(srctree)/kernel/bpf/disasm.c
 	$(QUIET_CC)$(CC) $(CFLAGS) -c -MMD $< -o $@
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version
  2024-03-20  1:34 [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version Quentin Monnet
@ 2024-03-20  6:19 ` Alexei Starovoitov
  2024-03-20  6:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2024-03-20  6:19 UTC (permalink / raw)
  To: Quentin Monnet
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	bpf

On Tue, Mar 19, 2024 at 6:35 PM Quentin Monnet <qmo@kernel.org> wrote:
>
> Commit d510296d331a ("bpftool: Use syscall/loader program in "prog load"
> and "gen skeleton" command.") added new files to the list of objects to
> compile in order to build the bootstrap version of bpftool. As far as I
> can tell, these objects are unnecessary and were added by mistake; maybe
> a draft version intended to add support for loading loader programs from
> the bootstrap version. Anyway, we can remove these object files from the
> list to make the bootstrap bpftool binary a tad smaller and faster to
> build.
>
> Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.")

I don't remember why I needed them back then.
Probably to debug lskel.
Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version
  2024-03-20  1:34 [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version Quentin Monnet
  2024-03-20  6:19 ` Alexei Starovoitov
@ 2024-03-20  6:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-20  6:20 UTC (permalink / raw)
  To: Quentin Monnet
  Cc: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, bpf

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 20 Mar 2024 01:34:57 +0000 you wrote:
> Commit d510296d331a ("bpftool: Use syscall/loader program in "prog load"
> and "gen skeleton" command.") added new files to the list of objects to
> compile in order to build the bootstrap version of bpftool. As far as I
> can tell, these objects are unnecessary and were added by mistake; maybe
> a draft version intended to add support for loading loader programs from
> the bootstrap version. Anyway, we can remove these object files from the
> list to make the bootstrap bpftool binary a tad smaller and faster to
> build.
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpftool: Remove unnecessary source files from bootstrap version
    https://git.kernel.org/bpf/bpf-next/c/e9a826dd145b

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] 3+ messages in thread

end of thread, other threads:[~2024-03-20  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20  1:34 [PATCH bpf-next] bpftool: Remove unnecessary source files from bootstrap version Quentin Monnet
2024-03-20  6:19 ` Alexei Starovoitov
2024-03-20  6:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox