bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool.
@ 2020-03-13 15:46 Carlos Neira
  2020-03-13 16:20 ` Quentin Monnet
  2020-03-13 17:21 ` Martin KaFai Lau
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Neira @ 2020-03-13 15:46 UTC (permalink / raw)
  To: netdev; +Cc: yhs, quentin, ebiederm, brouer, bpf, cneirabustos


When compiling bpftool the following warning is found: 
"declaration of 'struct bpf_pidns_info' will not be visible outside of this function."
This patch adds struct bpf_pidns_info to type_fwds array to fix this.

Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
---
 scripts/bpf_helpers_doc.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/bpf_helpers_doc.py b/scripts/bpf_helpers_doc.py
index c1e2b5410faa..f43d193aff3a 100755
--- a/scripts/bpf_helpers_doc.py
+++ b/scripts/bpf_helpers_doc.py
@@ -400,6 +400,7 @@ class PrinterHelpers(Printer):
             'struct bpf_fib_lookup',
             'struct bpf_perf_event_data',
             'struct bpf_perf_event_value',
+            'struct bpf_pidns_info',
             'struct bpf_sock',
             'struct bpf_sock_addr',
             'struct bpf_sock_ops',
-- 
2.20.1


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

* Re: [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool.
  2020-03-13 15:46 [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool Carlos Neira
@ 2020-03-13 16:20 ` Quentin Monnet
  2020-03-13 17:21 ` Martin KaFai Lau
  1 sibling, 0 replies; 5+ messages in thread
From: Quentin Monnet @ 2020-03-13 16:20 UTC (permalink / raw)
  To: Carlos Neira, netdev; +Cc: yhs, ebiederm, brouer, bpf

2020-03-13 12:46 UTC-0300 ~ Carlos Neira <cneirabustos@gmail.com>
> 
> When compiling bpftool the following warning is found: 
> "declaration of 'struct bpf_pidns_info' will not be visible outside of this function."
> This patch adds struct bpf_pidns_info to type_fwds array to fix this.
> 
> Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
> ---
>  scripts/bpf_helpers_doc.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/bpf_helpers_doc.py b/scripts/bpf_helpers_doc.py
> index c1e2b5410faa..f43d193aff3a 100755
> --- a/scripts/bpf_helpers_doc.py
> +++ b/scripts/bpf_helpers_doc.py
> @@ -400,6 +400,7 @@ class PrinterHelpers(Printer):
>              'struct bpf_fib_lookup',
>              'struct bpf_perf_event_data',
>              'struct bpf_perf_event_value',
> +            'struct bpf_pidns_info',
>              'struct bpf_sock',
>              'struct bpf_sock_addr',
>              'struct bpf_sock_ops',
> 

Note that the warning is not specific to bpftool (I just happened to
spot it when compiling this tool), it's for anything that uses libbpf,
or more generally, the generated header for helpers.

It is fixed by your patch, thank you!

Reviewed-by: Quentin Monnet <quentin@isovalent.com>

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

* Re: [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool.
  2020-03-13 15:46 [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool Carlos Neira
  2020-03-13 16:20 ` Quentin Monnet
@ 2020-03-13 17:21 ` Martin KaFai Lau
  2020-03-13 18:23   ` Carlos Antonio Neira Bustos
  1 sibling, 1 reply; 5+ messages in thread
From: Martin KaFai Lau @ 2020-03-13 17:21 UTC (permalink / raw)
  To: Carlos Neira; +Cc: netdev, yhs, quentin, ebiederm, brouer, bpf

On Fri, Mar 13, 2020 at 12:46:50PM -0300, Carlos Neira wrote:
> 
> When compiling bpftool the following warning is found: 
> "declaration of 'struct bpf_pidns_info' will not be visible outside of this function."
> This patch adds struct bpf_pidns_info to type_fwds array to fix this.
> 
> Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
Fixes: b4490c5c4e02 ("bpf: Added new helper bpf_get_ns_current_pid_tgid")
Acked-by: Martin KaFai Lau <kafai@fb.com>

Please add the Fixes tag next time.  Other than tracking,
it will be easier for review purpose also.

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

* Re: [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool.
  2020-03-13 17:21 ` Martin KaFai Lau
@ 2020-03-13 18:23   ` Carlos Antonio Neira Bustos
  2020-03-13 20:13     ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Antonio Neira Bustos @ 2020-03-13 18:23 UTC (permalink / raw)
  To: Martin KaFai Lau; +Cc: netdev, yhs, quentin, ebiederm, brouer, bpf

On Fri, Mar 13, 2020 at 10:21:19AM -0700, Martin KaFai Lau wrote:
> On Fri, Mar 13, 2020 at 12:46:50PM -0300, Carlos Neira wrote:
> > 
> > When compiling bpftool the following warning is found: 
> > "declaration of 'struct bpf_pidns_info' will not be visible outside of this function."
> > This patch adds struct bpf_pidns_info to type_fwds array to fix this.
> > 
> > Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
> Fixes: b4490c5c4e02 ("bpf: Added new helper bpf_get_ns_current_pid_tgid")
> Acked-by: Martin KaFai Lau <kafai@fb.com>
> 
> Please add the Fixes tag next time.  Other than tracking,
> it will be easier for review purpose also.

Thanks, I will do that in the future.

Bests

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

* Re: [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool.
  2020-03-13 18:23   ` Carlos Antonio Neira Bustos
@ 2020-03-13 20:13     ` Daniel Borkmann
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2020-03-13 20:13 UTC (permalink / raw)
  To: Carlos Antonio Neira Bustos, Martin KaFai Lau
  Cc: netdev, yhs, quentin, ebiederm, brouer, bpf

On 3/13/20 7:23 PM, Carlos Antonio Neira Bustos wrote:
> On Fri, Mar 13, 2020 at 10:21:19AM -0700, Martin KaFai Lau wrote:
>> On Fri, Mar 13, 2020 at 12:46:50PM -0300, Carlos Neira wrote:
>>>
>>> When compiling bpftool the following warning is found:
>>> "declaration of 'struct bpf_pidns_info' will not be visible outside of this function."
>>> This patch adds struct bpf_pidns_info to type_fwds array to fix this.
>>>
>>> Signed-off-by: Carlos Neira <cneirabustos@gmail.com>
>> Fixes: b4490c5c4e02 ("bpf: Added new helper bpf_get_ns_current_pid_tgid")
>> Acked-by: Martin KaFai Lau <kafai@fb.com>
>>
>> Please add the Fixes tag next time.  Other than tracking,
>> it will be easier for review purpose also.
> 
> Thanks, I will do that in the future.

Applied, thanks!

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13 15:46 [PATCH bpf-next] bpf_helpers_doc.py: Fix warning when compiling bpftool Carlos Neira
2020-03-13 16:20 ` Quentin Monnet
2020-03-13 17:21 ` Martin KaFai Lau
2020-03-13 18:23   ` Carlos Antonio Neira Bustos
2020-03-13 20:13     ` Daniel Borkmann

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).