> diff --git a/tools/testing/selftests/bpf/prog_tests/verifier.c 
> b/tools/testing/selftests/bpf/prog_tests/verifier.c
> index 8b439e194bcc5..8d5908e34c9b4 100644
> --- a/tools/testing/selftests/bpf/prog_tests/verifier.c
> +++ b/tools/testing/selftests/bpf/prog_tests/verifier.c

[ ... ]

> diff --git a/tools/testing/selftests/bpf/progs/verifier_mptcp.c 
> b/tools/testing/selftests/bpf/progs/verifier_mptcp.c
> new file mode 100644
> index 0000000000000..1f679265e0437
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/verifier_mptcp.c
> @@ -0,0 +1,101 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include "bpf_tracing_net.h"
> +#include <bpf/bpf_helpers.h>
> +#include "bpf_misc.h"

This isn't a bug, but since nothing from bpf_tracing_net.h is used here,
would a plain #include "vmlinux.h" (as progs/verifier_sock.c does) be enough
for struct mptcp_sock?

The file doesn't use any AF_*/SOL_*/TCP_*/IPPROTO_* constants or
bpf_core_read/BPF_CORE_READ that bpf_tracing_net.h provides. It only needs
the transitive vmlinux.h for struct mptcp_sock. The 9 verifier_*.c files
that need BTF kernel types include vmlinux.h directly.

> +
> +char _license[] SEC("license") = "GPL";
> +
> +__u32 token;
> +
> +static __always_inline struct bpf_sock *lookup_subflow(struct __sk_buff *skb)
> +{
> +     struct bpf_sock_tuple tuple = {};
> +
> +     return bpf_skc_lookup_tcp(skb, &tuple, sizeof(tuple.ipv4),
> +                               BPF_F_CURRENT_NETNS, 0);
> +}

[ ... ]


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/35199493791

Reply via email to