netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: YueHaibing <yuehaibing@huawei.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	Martin Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Andrii Nakryiko <andriin@fb.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Fix build error without CONFIG_NET
Date: Fri, 18 Oct 2019 18:11:07 +0000	[thread overview]
Message-ID: <ee9a06ec-33a0-3b39-92d8-21bd86261cc2@fb.com> (raw)
In-Reply-To: <20191018090344.26936-1-yuehaibing@huawei.com>



On 10/18/19 2:03 AM, YueHaibing wrote:
> If CONFIG_NET is n, building fails:
> 
> kernel/trace/bpf_trace.o: In function `raw_tp_prog_func_proto':
> bpf_trace.c:(.text+0x1a34): undefined reference to `bpf_skb_output_proto'
> 
> Wrap it into a #ifdef to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: a7658e1a4164 ("bpf: Check types of arguments passed into helpers")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Yonghong Song <yhs@fb.com>

> ---
>   kernel/trace/bpf_trace.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 52f7e9d..c324089 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -1055,8 +1055,10 @@ raw_tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
>   	switch (func_id) {
>   	case BPF_FUNC_perf_event_output:
>   		return &bpf_perf_event_output_proto_raw_tp;
> +#ifdef CONFIG_NET
>   	case BPF_FUNC_skb_output:
>   		return &bpf_skb_output_proto;
> +#endif
>   	case BPF_FUNC_get_stackid:
>   		return &bpf_get_stackid_proto_raw_tp;
>   	case BPF_FUNC_get_stack:
> 

  reply	other threads:[~2019-10-18 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  9:03 [PATCH bpf-next] bpf: Fix build error without CONFIG_NET YueHaibing
2019-10-18 18:11 ` Yonghong Song [this message]
2019-10-18 18:20   ` Steven Rostedt
2019-10-18 18:46     ` Daniel Borkmann
2019-10-18 18:49       ` Steven Rostedt
2019-10-18 19:10 ` Daniel Borkmann

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=ee9a06ec-33a0-3b39-92d8-21bd86261cc2@fb.com \
    --to=yhs@fb.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@fb.com \
    --cc=yuehaibing@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).