* [PATCH v3 0/1] bpftool: Align dumped file headers with skeletons
@ 2022-07-13 14:44 Francis Laniel
2022-07-13 14:44 ` [PATCH v3 1/1] bpftool: Align dumped file generated header " Francis Laniel
0 siblings, 1 reply; 5+ messages in thread
From: Francis Laniel @ 2022-07-13 14:44 UTC (permalink / raw)
To: bpf
Cc: Francis Laniel, Quentin Monnet, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa, open list
Hi.
First, I hope you are fine and the same for your relatives.
In this patch, I aligned dumped C file headers with that of skeletons, so the
first lines of C dumped files are the following:
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
#ifndef __VMLINUX_H__
#define __VMLINUX_H__
The goal is to warn users this file must not be edited as it was automatically
generated.
Indeed, skeletons also contain the same message.
This patch is clearly not a big change which impacts the future of bpftool but
I think it could be welcomed.
If you see any way to improve it or have any question, feel free to ask.
Change since:
v1:
* Drop command used to generate the file and use the same warning message
as skeletons.
* Add SPDX license.
v2:
* Drop RFC tag.
* Add Quentin Monnet Reviewed-By tag.
Francis Laniel (1):
bpftool: Align dumped file generated header with skeletons.
tools/bpf/bpftool/btf.c | 2 ++
1 file changed, 2 insertions(+)
Best regards and thank you in advance.
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.
2022-07-13 14:44 [PATCH v3 0/1] bpftool: Align dumped file headers with skeletons Francis Laniel
@ 2022-07-13 14:44 ` Francis Laniel
2022-07-13 14:47 ` Alexei Starovoitov
0 siblings, 1 reply; 5+ messages in thread
From: Francis Laniel @ 2022-07-13 14:44 UTC (permalink / raw)
To: bpf
Cc: Francis Laniel, Quentin Monnet, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa, open list
This commit adds the following lines to file generated by dump:
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
Hence, the dumped file headers follows that of skeletons.
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
---
tools/bpf/bpftool/btf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 7e6accb9d9f7..066a0acd0ecd 100644
--- a/tools/bpf/bpftool/btf.c
+++ b/tools/bpf/bpftool/btf.c
@@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
if (err)
return err;
+ printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n");
+ printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
printf("#ifndef __VMLINUX_H__\n");
printf("#define __VMLINUX_H__\n");
printf("\n");
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.
2022-07-13 14:44 ` [PATCH v3 1/1] bpftool: Align dumped file generated header " Francis Laniel
@ 2022-07-13 14:47 ` Alexei Starovoitov
2022-07-13 14:53 ` Francis Laniel
0 siblings, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2022-07-13 14:47 UTC (permalink / raw)
To: Francis Laniel
Cc: bpf, Quentin Monnet, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
open list
On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
<flaniel@linux.microsoft.com> wrote:
>
> This commit adds the following lines to file generated by dump:
> /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> Hence, the dumped file headers follows that of skeletons.
>
> Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
> ---
> tools/bpf/bpftool/btf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> index 7e6accb9d9f7..066a0acd0ecd 100644
> --- a/tools/bpf/bpftool/btf.c
> +++ b/tools/bpf/bpftool/btf.c
> @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> if (err)
> return err;
>
> + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n");
This was discussed earlier. It's incorrect and we cannot add just header
to vmlinux.h
> + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> printf("#ifndef __VMLINUX_H__\n");
> printf("#define __VMLINUX_H__\n");
> printf("\n");
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.
2022-07-13 14:47 ` Alexei Starovoitov
@ 2022-07-13 14:53 ` Francis Laniel
2022-07-13 16:03 ` sdf
0 siblings, 1 reply; 5+ messages in thread
From: Francis Laniel @ 2022-07-13 14:53 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: bpf, Quentin Monnet, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
open list
Le mercredi 13 juillet 2022, 16:47:17 CEST Alexei Starovoitov a écrit :
> On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
>
> <flaniel@linux.microsoft.com> wrote:
> > This commit adds the following lines to file generated by dump:
> > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> > Hence, the dumped file headers follows that of skeletons.
> >
> > Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
> > ---
> >
> > tools/bpf/bpftool/btf.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > index 7e6accb9d9f7..066a0acd0ecd 100644
> > --- a/tools/bpf/bpftool/btf.c
> > +++ b/tools/bpf/bpftool/btf.c
> > @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> >
> > if (err)
> >
> > return err;
> >
> > + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
> > */\n");
> This was discussed earlier. It's incorrect and we cannot add just header
> to vmlinux.h
Oops sorry, I will send a v4 dropping it.
Nonetheless can you please send me a link for a discussion about this?
>
> > + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> >
> > printf("#ifndef __VMLINUX_H__\n");
> > printf("#define __VMLINUX_H__\n");
> > printf("\n");
> >
> > --
> > 2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.
2022-07-13 14:53 ` Francis Laniel
@ 2022-07-13 16:03 ` sdf
0 siblings, 0 replies; 5+ messages in thread
From: sdf @ 2022-07-13 16:03 UTC (permalink / raw)
To: Francis Laniel
Cc: Alexei Starovoitov, bpf, Quentin Monnet, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Hao Luo, Jiri Olsa,
open list
On 07/13, Francis Laniel wrote:
> Le mercredi 13 juillet 2022, 16:47:17 CEST Alexei Starovoitov a �crit :
> > On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
> >
> > <flaniel@linux.microsoft.com> wrote:
> > > This commit adds the following lines to file generated by dump:
> > > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > > /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> > > Hence, the dumped file headers follows that of skeletons.
> > >
> > > Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
> > > ---
> > >
> > > tools/bpf/bpftool/btf.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > > index 7e6accb9d9f7..066a0acd0ecd 100644
> > > --- a/tools/bpf/bpftool/btf.c
> > > +++ b/tools/bpf/bpftool/btf.c
> > > @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> > >
> > > if (err)
> > >
> > > return err;
> > >
> > > + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
> > > */\n");
> > This was discussed earlier. It's incorrect and we cannot add just header
> > to vmlinux.h
> Oops sorry, I will send a v4 dropping it.
> Nonetheless can you please send me a link for a discussion about this?
+1, Google only gives me the following:
https://lore.kernel.org/bpf/87czmwe26c.fsf@toke.dk/T/
(which is somewhat inconclusive?)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-13 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 14:44 [PATCH v3 0/1] bpftool: Align dumped file headers with skeletons Francis Laniel
2022-07-13 14:44 ` [PATCH v3 1/1] bpftool: Align dumped file generated header " Francis Laniel
2022-07-13 14:47 ` Alexei Starovoitov
2022-07-13 14:53 ` Francis Laniel
2022-07-13 16:03 ` sdf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox