From: Daniel Borkmann <daniel@iogearbox.net>
To: Artem Savkov <asavkov@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: fix compilation failure when CONFIG_NET_FOU!=y
Date: Fri, 19 Jul 2024 17:45:31 +0200 [thread overview]
Message-ID: <005ef8ac-d48e-304f-65c5-97a17d83fd86@iogearbox.net> (raw)
In-Reply-To: <20240718143122.2230780-1-asavkov@redhat.com>
Hi Artem,
On 7/18/24 4:31 PM, Artem Savkov wrote:
> Without CONFIG_NET_FOU bpf selftests are unable to build because of
> missing definitions. Add ___local versions of struct bpf_fou_encap and
> enum bpf_fou_encap_type to fix the issue.
>
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
This breaks BPF CI, ptal:
https://github.com/kernel-patches/bpf/actions/runs/9999691294/job/27641198557
[...]
CLNG-BPF [test_maps] btf__core_reloc_existence___wrong_field_defs.bpf.o
CLNG-BPF [test_maps] verifier_bswap.bpf.o
CLNG-BPF [test_maps] test_core_reloc_existence.bpf.o
CLNG-BPF [test_maps] test_global_func8.bpf.o
CLNG-BPF [test_maps] verifier_bitfield_write.bpf.o
CLNG-BPF [test_maps] local_storage_bench.bpf.o
CLNG-BPF [test_maps] verifier_runtime_jit.bpf.o
CLNG-BPF [test_maps] test_pkt_access.bpf.o
progs/test_tunnel_kern.c:39:5: error: conflicting types for 'bpf_skb_set_fou_encap'
39 | int bpf_skb_set_fou_encap(struct __sk_buff *skb_ctx,
| ^
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:107714:12: note: previous declaration is here
107714 | extern int bpf_skb_set_fou_encap(struct __sk_buff *skb_ctx, struct bpf_fou_encap *encap, int type) __weak __ksym;
| ^
progs/test_tunnel_kern.c:41:5: error: conflicting types for 'bpf_skb_get_fou_encap'
41 | int bpf_skb_get_fou_encap(struct __sk_buff *skb_ctx,
| ^
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:107715:12: note: previous declaration is here
107715 | extern int bpf_skb_get_fou_encap(struct __sk_buff *skb_ctx, struct bpf_fou_encap *encap) __weak __ksym;
| ^
CLNG-BPF [test_maps] verifier_typedef.bpf.o
CLNG-BPF [test_maps] user_ringbuf_fail.bpf.o
CLNG-BPF [test_maps] verifier_map_in_map.bpf.o
progs/test_tunnel_kern.c:782:35: error: incompatible pointer types passing 'struct bpf_fou_encap___local *' to parameter of type 'struct bpf_fou_encap *' [-Werror,-Wincompatible-pointer-types]
782 | ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_GUE___local);
| ^~~~~~
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:107714:83: note: passing argument to parameter 'encap' here
107714 | extern int bpf_skb_set_fou_encap(struct __sk_buff *skb_ctx, struct bpf_fou_encap *encap, int type) __weak __ksym;
| ^
progs/test_tunnel_kern.c:819:35: error: incompatible pointer types passing 'struct bpf_fou_encap___local *' to parameter of type 'struct bpf_fou_encap *' [-Werror,-Wincompatible-pointer-types]
819 | ret = bpf_skb_set_fou_encap(skb, &encap, FOU_BPF_ENCAP_FOU___local);
| ^~~~~~
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:107714:83: note: passing argument to parameter 'encap' here
107714 | extern int bpf_skb_set_fou_encap(struct __sk_buff *skb_ctx, struct bpf_fou_encap *encap, int type) __weak __ksym;
| ^
progs/test_tunnel_kern.c:841:35: error: incompatible pointer types passing 'struct bpf_fou_encap___local *' to parameter of type 'struct bpf_fou_encap *' [-Werror,-Wincompatible-pointer-types]
841 | ret = bpf_skb_get_fou_encap(skb, &encap);
| ^~~~~~
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:107715:83: note: passing argument to parameter 'encap' here
107715 | extern int bpf_skb_get_fou_encap(struct __sk_buff *skb_ctx, struct bpf_fou_encap *encap) __weak __ksym;
| ^
5 errors generated.
CLNG-BPF [test_maps] verifier_bounds_deduction.bpf.o
CLNG-BPF [test_maps] test_netfilter_link_attach.bpf.o
CLNG-BPF [test_maps] verifier_jeq_infer_not_null.bpf.o
make: *** [Makefile:654: /tmp/work/bpf/bpf/tools/testing/selftests/bpf/test_tunnel_kern.bpf.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/tmp/work/bpf/bpf/tools/testing/selftests/bpf'
Error: Process completed with exit code 2.
next prev parent reply other threads:[~2024-07-19 15:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 14:31 [PATCH bpf-next] selftests/bpf: fix compilation failure when CONFIG_NET_FOU!=y Artem Savkov
2024-07-19 15:45 ` Daniel Borkmann [this message]
2024-07-19 17:09 ` Alexei Starovoitov
2024-07-19 18:44 ` Andrii Nakryiko
2024-07-22 6:56 ` Artem Savkov
2024-07-22 12:03 ` Artem Savkov
2024-07-22 13:52 ` [PATCH bpf-next v2] " Artem Savkov
2024-07-22 14:18 ` bot+bpf-ci
2024-07-22 19:45 ` Alexei Starovoitov
2024-07-23 7:10 ` [PATCH bpf-next v3] " Artem Savkov
2024-07-23 7:32 ` bot+bpf-ci
2024-07-23 9:44 ` Simon Horman
2024-07-23 20:21 ` Andrii Nakryiko
2024-07-23 20:30 ` patchwork-bot+netdevbpf
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=005ef8ac-d48e-304f-65c5-97a17d83fd86@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii@kernel.org \
--cc=asavkov@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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