BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command
@ 2021-02-19 22:21 grantseltzer
  2021-02-19 22:36 ` Martin KaFai Lau
  0 siblings, 1 reply; 4+ messages in thread
From: grantseltzer @ 2021-02-19 22:21 UTC (permalink / raw)
  To: andrii, daniel, kafai, songliubraving, john.fastabend, kpsingh
  Cc: bpf, grantseltzer

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
---
 tools/bpf/bpftool/feature.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 359960a8f..34343e7fa 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char *define_prefix)
 		{ "CONFIG_BPF_JIT", },
 		/* Avoid compiling eBPF interpreter (use JIT only) */
 		{ "CONFIG_BPF_JIT_ALWAYS_ON", },
+		/* Enable using BTF debug information */
+		{ "CONFIG_DEBUG_INFO_BTF", },
 
 		/* cgroups */
 		{ "CONFIG_CGROUPS", },
-- 
2.29.2


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

* Re: [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command
  2021-02-19 22:21 [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command grantseltzer
@ 2021-02-19 22:36 ` Martin KaFai Lau
  2021-02-19 22:43   ` Grant Seltzer Richman
  0 siblings, 1 reply; 4+ messages in thread
From: Martin KaFai Lau @ 2021-02-19 22:36 UTC (permalink / raw)
  To: grantseltzer; +Cc: andrii, daniel, songliubraving, john.fastabend, kpsingh, bpf

There is no description.  Please provide a commit message.

On Fri, Feb 19, 2021 at 10:21:35PM +0000, grantseltzer wrote:
> Signed-off-by: grantseltzer <grantseltzer@gmail.com>
> ---
>  tools/bpf/bpftool/feature.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> index 359960a8f..34343e7fa 100644
> --- a/tools/bpf/bpftool/feature.c
> +++ b/tools/bpf/bpftool/feature.c
> @@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char *define_prefix)
>  		{ "CONFIG_BPF_JIT", },
>  		/* Avoid compiling eBPF interpreter (use JIT only) */
>  		{ "CONFIG_BPF_JIT_ALWAYS_ON", },
> +		/* Enable using BTF debug information */
> +		{ "CONFIG_DEBUG_INFO_BTF", },
>  
>  		/* cgroups */
>  		{ "CONFIG_CGROUPS", },
> -- 
> 2.29.2
> 

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

* Re: [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command
  2021-02-19 22:36 ` Martin KaFai Lau
@ 2021-02-19 22:43   ` Grant Seltzer Richman
  2021-02-20 22:50     ` Martin KaFai Lau
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Seltzer Richman @ 2021-02-19 22:43 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: andrii, daniel, songliubraving, john.fastabend, kpsingh, bpf

This adds the CONFIG_DEBUG_INFO_BTF kernel compile option to output of
the bpftool feature command. This is relevant for developers that want
to use libbpf to account for data structure definition differences
between kernels.

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
---
 tools/bpf/bpftool/feature.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 359960a8f..34343e7fa 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char
*define_prefix)
                { "CONFIG_BPF_JIT", },
                /* Avoid compiling eBPF interpreter (use JIT only) */
                { "CONFIG_BPF_JIT_ALWAYS_ON", },
+               /* Enable using BTF debug information */
+               { "CONFIG_DEBUG_INFO_BTF", },

                /* cgroups */
                { "CONFIG_CGROUPS", },
--
2.29.2

On Fri, Feb 19, 2021 at 5:36 PM Martin KaFai Lau <kafai@fb.com> wrote:
>
> There is no description.  Please provide a commit message.
>
> On Fri, Feb 19, 2021 at 10:21:35PM +0000, grantseltzer wrote:
> > Signed-off-by: grantseltzer <grantseltzer@gmail.com>
> > ---
> >  tools/bpf/bpftool/feature.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> > index 359960a8f..34343e7fa 100644
> > --- a/tools/bpf/bpftool/feature.c
> > +++ b/tools/bpf/bpftool/feature.c
> > @@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char *define_prefix)
> >               { "CONFIG_BPF_JIT", },
> >               /* Avoid compiling eBPF interpreter (use JIT only) */
> >               { "CONFIG_BPF_JIT_ALWAYS_ON", },
> > +             /* Enable using BTF debug information */
> > +             { "CONFIG_DEBUG_INFO_BTF", },
> >
> >               /* cgroups */
> >               { "CONFIG_CGROUPS", },
> > --
> > 2.29.2
> >

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

* Re: [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command
  2021-02-19 22:43   ` Grant Seltzer Richman
@ 2021-02-20 22:50     ` Martin KaFai Lau
  0 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2021-02-20 22:50 UTC (permalink / raw)
  To: Grant Seltzer Richman
  Cc: andrii, daniel, songliubraving, john.fastabend, kpsingh, bpf

On Fri, Feb 19, 2021 at 05:43:00PM -0500, Grant Seltzer Richman wrote:
> This adds the CONFIG_DEBUG_INFO_BTF kernel compile option to output of
> the bpftool feature command. This is relevant for developers that want
> to use libbpf to account for data structure definition differences
> between kernels.
> 
> Signed-off-by: grantseltzer <grantseltzer@gmail.com>
> ---
>  tools/bpf/bpftool/feature.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> index 359960a8f..34343e7fa 100644
> --- a/tools/bpf/bpftool/feature.c
> +++ b/tools/bpf/bpftool/feature.c
> @@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char
> *define_prefix)
>                 { "CONFIG_BPF_JIT", },
>                 /* Avoid compiling eBPF interpreter (use JIT only) */
>                 { "CONFIG_BPF_JIT_ALWAYS_ON", },
> +               /* Enable using BTF debug information */
> +               { "CONFIG_DEBUG_INFO_BTF", },
> 
>                 /* cgroups */
>                 { "CONFIG_CGROUPS", },
> --
> 2.29.2
> 
> On Fri, Feb 19, 2021 at 5:36 PM Martin KaFai Lau <kafai@fb.com> wrote:
> >
> > There is no description.  Please provide a commit message.
> >
> > On Fri, Feb 19, 2021 at 10:21:35PM +0000, grantseltzer wrote:
> > > Signed-off-by: grantseltzer <grantseltzer@gmail.com>
> > > ---
> > >  tools/bpf/bpftool/feature.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> > > index 359960a8f..34343e7fa 100644
> > > --- a/tools/bpf/bpftool/feature.c
> > > +++ b/tools/bpf/bpftool/feature.c
> > > @@ -336,6 +336,8 @@ static void probe_kernel_image_config(const char *define_prefix)
> > >               { "CONFIG_BPF_JIT", },
> > >               /* Avoid compiling eBPF interpreter (use JIT only) */
> > >               { "CONFIG_BPF_JIT_ALWAYS_ON", },
> > > +             /* Enable using BTF debug information */
> > > +             { "CONFIG_DEBUG_INFO_BTF", },
> > >
> > >               /* cgroups */
> > >               { "CONFIG_CGROUPS", },
I don't think this old reference "> >" part can be applied.
Please resubmit a clean patch instead of replying to the
old one.  Documentation/process/submitting-patches.rst has
details on the how-tos.

It is not a bug fix, so it belongs to bpf-next
(Documentation/bpf/bpf_devel_QA.rst).
Please tag it with bpf-next.  The next revision will be v2,
sample commands would be:
git format-patch --subject-prefix='PATCH v2 bpf-next' ...
./scripts/checkpatch.pl ...
git send-email ...

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 22:21 [PATCH] add CONFIG_DEBUG_INFO_BTF check to bpftool feature command grantseltzer
2021-02-19 22:36 ` Martin KaFai Lau
2021-02-19 22:43   ` Grant Seltzer Richman
2021-02-20 22:50     ` Martin KaFai Lau

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git