* [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL
@ 2017-12-01 19:06 Jason Gunthorpe
2017-12-01 19:32 ` Daniel Borkmann
2017-12-01 19:48 ` Steven Rostedt
0 siblings, 2 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2017-12-01 19:06 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar; +Cc: Jesper Dangaard Brouer, linux-kernel, netdev
Such as:
In file included from ./include/trace/events/xdp.h:10:0,
from ./include/linux/bpf_trace.h:6,
from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29:
./include/trace/events/xdp.h:94:17: warning: ‘struct bpf_map’ declared inside parameter list
const struct bpf_map *map, u32 map_index),
^
By adding a forward declaration for struct bpf_map. In the
CONFIG_BPF_SYSCALL case the declaration comes in via
trace/events/bpf.h
Fixes: 59a308967589 ("xdp: separate xdp_redirect tracepoint in map case")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
include/trace/events/xdp.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
index 4cd0f05d01134d..36b2a9043189be 100644
--- a/include/trace/events/xdp.h
+++ b/include/trace/events/xdp.h
@@ -9,6 +9,8 @@
#include <linux/filter.h>
#include <linux/tracepoint.h>
+struct bpf_map;
+
#define __XDP_ACT_MAP(FN) \
FN(ABORTED) \
FN(DROP) \
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL
2017-12-01 19:06 [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL Jason Gunthorpe
@ 2017-12-01 19:32 ` Daniel Borkmann
2017-12-01 19:48 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2017-12-01 19:32 UTC (permalink / raw)
To: Jason Gunthorpe, Steven Rostedt, Ingo Molnar
Cc: Jesper Dangaard Brouer, linux-kernel, netdev
On 12/01/2017 08:06 PM, Jason Gunthorpe wrote:
> Such as:
>
> In file included from ./include/trace/events/xdp.h:10:0,
> from ./include/linux/bpf_trace.h:6,
> from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29:
> ./include/trace/events/xdp.h:94:17: warning: ‘struct bpf_map’ declared inside parameter list
> const struct bpf_map *map, u32 map_index),
> ^
>
> By adding a forward declaration for struct bpf_map. In the
> CONFIG_BPF_SYSCALL case the declaration comes in via
> trace/events/bpf.h
>
> Fixes: 59a308967589 ("xdp: separate xdp_redirect tracepoint in map case")
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Thanks! Fixed here already in the bpf tree:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=23721a755f98ac846897a013c92cccb281c1bcc8
> include/trace/events/xdp.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 4cd0f05d01134d..36b2a9043189be 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -9,6 +9,8 @@
> #include <linux/filter.h>
> #include <linux/tracepoint.h>
>
> +struct bpf_map;
> +
> #define __XDP_ACT_MAP(FN) \
> FN(ABORTED) \
> FN(DROP) \
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL
2017-12-01 19:06 [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL Jason Gunthorpe
2017-12-01 19:32 ` Daniel Borkmann
@ 2017-12-01 19:48 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2017-12-01 19:48 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: Ingo Molnar, Jesper Dangaard Brouer, linux-kernel, netdev
On Fri, 1 Dec 2017 12:06:05 -0700
Jason Gunthorpe <jgg@mellanox.com> wrote:
> Such as:
>
> In file included from ./include/trace/events/xdp.h:10:0,
> from ./include/linux/bpf_trace.h:6,
> from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29:
> ./include/trace/events/xdp.h:94:17: warning: ‘struct bpf_map’ declared inside parameter list
> const struct bpf_map *map, u32 map_index),
> ^
>
> By adding a forward declaration for struct bpf_map. In the
> CONFIG_BPF_SYSCALL case the declaration comes in via
> trace/events/bpf.h
This was already fixed:
http://lkml.kernel.org/r/1512006089-180279-1-git-send-email-xiexiuqi@huawei.com
-- Steve
>
> Fixes: 59a308967589 ("xdp: separate xdp_redirect tracepoint in map case")
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
> include/trace/events/xdp.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 4cd0f05d01134d..36b2a9043189be 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -9,6 +9,8 @@
> #include <linux/filter.h>
> #include <linux/tracepoint.h>
>
> +struct bpf_map;
> +
> #define __XDP_ACT_MAP(FN) \
> FN(ABORTED) \
> FN(DROP) \
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-01 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 19:06 [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL Jason Gunthorpe
2017-12-01 19:32 ` Daniel Borkmann
2017-12-01 19:48 ` Steven Rostedt
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).