* [PATCH] samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided
@ 2022-05-07 16:16 Jerome Marchand
2022-05-10 0:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jerome Marchand @ 2022-05-07 16:16 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Kumar Kartikeya Dwivedi
Cc: Jerome Marchand, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, netdev, bpf, linux-kernel
samples/bpf build currently always fails if it can't generate
vmlinux.h from vmlinux, even when vmlinux.h is directly provided by
VMLINUX_H variable, which makes VMLINUX_H pointless.
Only fails when neither method works.
Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support")
Reported-by: CKI Project <cki-project@redhat.com>
Reported-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
samples/bpf/Makefile | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 38638845db9d..72bb85c18804 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -368,16 +368,15 @@ VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS))))
$(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL)
ifeq ($(VMLINUX_H),)
+ifeq ($(VMLINUX_BTF),)
+ $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)",\
+ build the kernel or set VMLINUX_BTF or VMLINUX_H variable)
+endif
$(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF) format c > $@
else
$(Q)cp "$(VMLINUX_H)" $@
endif
-ifeq ($(VMLINUX_BTF),)
- $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)",\
- build the kernel or set VMLINUX_BTF variable)
-endif
-
clean-files += vmlinux.h
# Get Clang's default includes on this system, as opposed to those seen by
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided
2022-05-07 16:16 [PATCH] samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided Jerome Marchand
@ 2022-05-10 0:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-10 0:50 UTC (permalink / raw)
To: Jerome Marchand
Cc: ast, daniel, andrii, memxor, kafai, songliubraving, yhs,
john.fastabend, kpsingh, netdev, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Sat, 7 May 2022 18:16:35 +0200 you wrote:
> samples/bpf build currently always fails if it can't generate
> vmlinux.h from vmlinux, even when vmlinux.h is directly provided by
> VMLINUX_H variable, which makes VMLINUX_H pointless.
> Only fails when neither method works.
>
> Fixes: 384b6b3bbf0d ("samples: bpf: Add vmlinux.h generation support")
> Reported-by: CKI Project <cki-project@redhat.com>
> Reported-by: Veronika Kabatova <vkabatov@redhat.com>
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
>
> [...]
Here is the summary with links:
- samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided
https://git.kernel.org/bpf/bpf-next/c/ec24704492d8
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-05-10 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 16:16 [PATCH] samples: bpf: Don't fail for a missing VMLINUX_BTF when VMLINUX_H is provided Jerome Marchand
2022-05-10 0:50 ` 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;
as well as URLs for NNTP newsgroup(s).