[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yo8b5W5VdW1NpLyL@d3>
Date: Thu, 26 May 2022 15:19:17 +0900
From: Benjamin Poirier <benjamin.poirier@...il.com>
To: Kumar Kartikeya Dwivedi <memxor@...il.com>
Cc: bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
Maxim Mikityanskiy <maximmi@...dia.com>,
Pablo Neira Ayuso <pablo@...filter.org>,
Florian Westphal <fw@...len.de>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests
On 2022-05-26 10:45 +0530, Kumar Kartikeya Dwivedi wrote:
> On Thu, May 26, 2022 at 06:52:59AM IST, Benjamin Poirier wrote:
> > On 2022-01-14 22:09 +0530, Kumar Kartikeya Dwivedi wrote:
> > > Use the prog_test kfuncs to test the referenced PTR_TO_BTF_ID kfunc
> > > support, and PTR_TO_CTX, PTR_TO_MEM argument passing support. Also
> > > testing the various failure cases for invalid kfunc prototypes.
> > >
> > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
> > > ---
> > > net/bpf/test_run.c | 129 +++++++++++++++++-
> > > .../selftests/bpf/prog_tests/kfunc_call.c | 6 +
> > > .../selftests/bpf/progs/kfunc_call_test.c | 52 ++++++-
> > > tools/testing/selftests/bpf/verifier/calls.c | 75 ++++++++++
> > > 4 files changed, 258 insertions(+), 4 deletions(-)
> > >
> >
> > It looks like this patch broke building the bpf tests:
> >
> > tools/testing/selftests/bpf$ make
> > CLNG-BPF [test_maps] kfunc_call_test.o
> > progs/kfunc_call_test.c:13:46: error: declaration of 'struct prog_test_pass1' will not be visible outside of this function [-Werror,-Wvisibility]
> > extern void bpf_kfunc_call_test_pass1(struct prog_test_pass1 *p) __ksym;
> > ^
> >
> > The only definition of struct prog_test_pass1 that I see is in
> > net/bpf/test_run.c. How is this supposed to work?
> >
> >
> > commit 87091063df5d ("selftests/bpf: Add test for unstable CT lookup
> > API") from the same series added a similar problem in
> > progs/test_bpf_nf.c:
> >
> > progs/test_bpf_nf.c:31:21: error: variable has incomplete type 'struct bpf_ct_opts'
> > struct bpf_ct_opts opts_def = { .l4proto = IPPROTO_TCP, .netns_id = -1 };
> >
>
> Both of them should have their definition in vmlinux.h. Can you check?
My bad, I didn't realize it was generated from the running kernel. The
build works after trying again while running v5.18.
Powered by blists - more mailing lists