Re: [PATCH bpf-next v2] bpf: Only call sock_from_file with CONFIG_NET

2020-12-08 Thread Florent Revest
On Mon, 2020-12-07 at 13:33 -0800, Martin KaFai Lau wrote: > On Mon, Dec 07, 2020 at 09:06:05PM +0100, Florent Revest wrote: > > This avoids > > ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': > > bpf_trace.c:(.text+0xe23): undefined reference to > > `sock_from_file' > > When

Re: [PATCH bpf-next v2] bpf: Only call sock_from_file with CONFIG_NET

2020-12-07 Thread Martin KaFai Lau
On Mon, Dec 07, 2020 at 09:06:05PM +0100, Florent Revest wrote: > This avoids > ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': > bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file' > When compiling a kernel with BPF and without NET. > > Reported-by: Randy

Re: [PATCH bpf-next v2] bpf: Only call sock_from_file with CONFIG_NET

2020-12-07 Thread Randy Dunlap
On 12/7/20 12:06 PM, Florent Revest wrote: > This avoids > ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': > bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file' > When compiling a kernel with BPF and without NET. > > Reported-by: Randy Dunlap > Signed-off-by:

[PATCH bpf-next v2] bpf: Only call sock_from_file with CONFIG_NET

2020-12-07 Thread Florent Revest
This avoids ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file' When compiling a kernel with BPF and without NET. Reported-by: Randy Dunlap Signed-off-by: Florent Revest --- kernel/trace/bpf_trace.c | 4 1