From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Xie XiuQi <xiexiuqi@huawei.com>
Cc: <rostedt@goodmis.org>, <mingo@redhat.com>, <davem@davemloft.net>,
<daniel@iogearbox.net>, <ast@kernel.org>,
<kstewart@linuxfoundation.org>, <gregkh@linuxfoundation.org>,
<john.fastabend@gmail.com>, <linux-kernel@vger.kernel.org>,
<huangdaode@hisilicon.com>, Hanjun Guo <guohanjun@huawei.com>,
brouer@redhat.com,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] trace/xdp: fix compile warning: ‘struct bpf_map’ declared inside parameter list
Date: Wed, 29 Nov 2017 10:15:30 +0100 [thread overview]
Message-ID: <20171129101530.75261e91@redhat.com> (raw)
In-Reply-To: <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com>
On Wed, 29 Nov 2017 16:35:01 +0800
Xie XiuQi <xiexiuqi@huawei.com> wrote:
> We meet this compile warning, which caused by missing bpf.h in xdp.h.
>
> 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:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration
> const struct bpf_map *map, u32 map_index),
> ^
> ./include/linux/tracepoint.h:187:34: note: in definition of macro ‘__DECLARE_TRACE’
> static inline void trace_##name(proto) \
> ^~~~~
> ./include/linux/tracepoint.h:352:24: note: in expansion of macro ‘PARAMS’
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> ^~~~~~
> ./include/linux/tracepoint.h:477:2: note: in expansion of macro ‘DECLARE_TRACE’
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:477:22: note: in expansion of macro ‘PARAMS’
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~
> ./include/trace/events/xdp.h:89:1: note: in expansion of macro ‘DEFINE_EVENT’
> DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
> ^~~~~~~~~~~~
> ./include/trace/events/xdp.h:90:2: note: in expansion of macro ‘TP_PROTO’
> TP_PROTO(const struct net_device *dev,
> ^~~~~~~~
> ./include/trace/events/xdp.h:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration
> const struct bpf_map *map, u32 map_index),
> ^
> ./include/linux/tracepoint.h:203:38: note: in definition of macro ‘__DECLARE_TRACE’
> register_trace_##name(void (*probe)(data_proto), void *data) \
> ^~~~~~~~~~
> ./include/linux/tracepoint.h:354:4: note: in expansion of macro ‘PARAMS’
> PARAMS(void *__data, proto), \
> ^~~~~~
>
> Reported-by: Huang Daode <huangdaode@hisilicon.com>
> Cc: Hanjun Guo <guohanjun@huawei.com>
> Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
> ---
> include/trace/events/xdp.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 4cd0f05..8989a92 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -8,6 +8,7 @@
> #include <linux/netdevice.h>
> #include <linux/filter.h>
> #include <linux/tracepoint.h>
> +#include <linux/bpf.h>
>
> #define __XDP_ACT_MAP(FN) \
> FN(ABORTED) \
Strange that I'm not see this compile issue, and kbuild-bot also didn't
report it, but the patch looks okay to me... I guess I introduced the
issue in below "fixes" commit. Can the person applying this include
the fixes line?
Fixes: 8d3b778ff544 ("xdp: tracepoint xdp_redirect also need a map argument")
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next parent reply other threads:[~2017-11-29 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com>
2017-11-29 9:15 ` Jesper Dangaard Brouer [this message]
2017-11-29 11:13 ` [PATCH] trace/xdp: fix compile warning: ‘struct bpf_map’ declared inside parameter list Daniel Borkmann
2017-11-30 1:28 ` Xie XiuQi
[not found] ` <f6c35abbbecb43c49b5bd4893ab1128d@AcuMS.aculab.com>
2017-11-29 14:05 ` Jesper Dangaard Brouer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171129101530.75261e91@redhat.com \
--to=brouer@redhat.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=guohanjun@huawei.com \
--cc=huangdaode@hisilicon.com \
--cc=john.fastabend@gmail.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=xiexiuqi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).