* [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton
@ 2026-05-20 9:40 Siddharth Nayyar
2026-05-20 9:51 ` Quentin Monnet
2026-05-28 21:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Siddharth Nayyar @ 2026-05-20 9:40 UTC (permalink / raw)
To: Quentin Monnet, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song, Jiri Olsa,
Mykyta Yatsenko
Cc: bpf, linux-kernel, gprocida, maennich, Siddharth Nayyar
When generating light skeletons for BPF programs containing struct_ops
maps, bpftool incorrectly outputs a stray literal 't' instead of a tab
character for the map file descriptor member in the links structure.
This causes a compilation error when the generated light skeleton is
used.
Correct the format string by replacing 't' with '\t'.
Fixes: 08ac454e258e ("libbpf: Auto-attach struct_ops BPF maps in BPF skeleton")
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
---
tools/bpf/bpftool/gen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 2f9e10752e28..d6040b52d4e1 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -1399,7 +1399,7 @@ static int do_skeleton(int argc, char **argv)
continue;
if (use_loader)
- printf("t\tint %s_fd;\n", ident);
+ printf("\t\tint %s_fd;\n", ident);
else
printf("\t\tstruct bpf_link *%s;\n", ident);
}
---
base-commit: c6e99c10fd9855082568cbd71bb2cc5dc90eda53
change-id: 20260519-struct_ops_gen_typo_fix-59d53748cece
Best regards,
--
Siddharth Nayyar <sidnayyar@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton
2026-05-20 9:40 [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton Siddharth Nayyar
@ 2026-05-20 9:51 ` Quentin Monnet
2026-05-28 21:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Quentin Monnet @ 2026-05-20 9:51 UTC (permalink / raw)
To: Siddharth Nayyar, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song, Jiri Olsa,
Mykyta Yatsenko
Cc: bpf, linux-kernel, gprocida, maennich
2026-05-20 09:40 UTC+0000 ~ Siddharth Nayyar <sidnayyar@google.com>
> When generating light skeletons for BPF programs containing struct_ops
> maps, bpftool incorrectly outputs a stray literal 't' instead of a tab
> character for the map file descriptor member in the links structure.
> This causes a compilation error when the generated light skeleton is
> used.
>
> Correct the format string by replacing 't' with '\t'.
>
> Fixes: 08ac454e258e ("libbpf: Auto-attach struct_ops BPF maps in BPF skeleton")
> Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
Acked-by: Quentin Monnet <qmo@kernel.org>
Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton
2026-05-20 9:40 [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton Siddharth Nayyar
2026-05-20 9:51 ` Quentin Monnet
@ 2026-05-28 21:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-28 21:30 UTC (permalink / raw)
To: Sid Nayyar
Cc: qmo, ast, daniel, andrii, martin.lau, eddyz87, memxor, song,
yonghong.song, jolsa, yatsenko, bpf, linux-kernel, gprocida,
maennich
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Wed, 20 May 2026 09:40:44 +0000 you wrote:
> When generating light skeletons for BPF programs containing struct_ops
> maps, bpftool incorrectly outputs a stray literal 't' instead of a tab
> character for the map file descriptor member in the links structure.
> This causes a compilation error when the generated light skeleton is
> used.
>
> Correct the format string by replacing 't' with '\t'.
>
> [...]
Here is the summary with links:
- bpftool: fix typo in struct_ops map FD generation for light skeleton
https://git.kernel.org/bpf/bpf-next/c/be4c6c7bc429
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:[~2026-05-28 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-20 9:40 [PATCH] bpftool: fix typo in struct_ops map FD generation for light skeleton Siddharth Nayyar
2026-05-20 9:51 ` Quentin Monnet
2026-05-28 21:30 ` 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
Powered by JetHome