> diff --git a/tools/testing/selftests/bpf/progs/xdp_metadata.c 
> b/tools/testing/selftests/bpf/progs/xdp_metadata.c
> index 09bb8a038d52..ef6a5584a187 100644
> --- a/tools/testing/selftests/bpf/progs/xdp_metadata.c
> +++ b/tools/testing/selftests/bpf/progs/xdp_metadata.c

[ ... ]

> @@ -98,6 +98,7 @@ int rx(struct xdp_md *ctx)
>       bpf_xdp_metadata_rx_hash(ctx, &meta->rx_hash, &meta->rx_hash_type);
>       bpf_xdp_metadata_rx_vlan_tag(ctx, &meta->rx_vlan_proto,
>                                    &meta->rx_vlan_tci);
> +     bpf_xdp_metadata_rx_checksum(ctx, &meta->ip_summed, &meta->cksum_meta);

Is there a missing extern declaration for bpf_xdp_metadata_rx_checksum()?
The other kfuncs used in this file have extern declarations with __ksym:

extern int bpf_xdp_metadata_rx_timestamp(const struct xdp_md *ctx,
                                         __u64 *timestamp) __ksym;
extern int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, __u32 *hash,
                                    enum xdp_rss_hash_type *rss_type) __ksym;
extern int bpf_xdp_metadata_rx_vlan_tag(const struct xdp_md *ctx,
                                        __be16 *vlan_proto,
                                        __u16 *vlan_tci) __ksym;

Without a similar declaration for bpf_xdp_metadata_rx_checksum(), the BPF
program may fail to compile or link.


---
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/21875603263

AI-authorship-score: low
AI-authorship-explanation: The code follows standard BPF selftest patterns and 
appears to be written by a domain expert familiar with XDP metadata kfuncs.
issues-found: 1
issue-severity-score: medium
issue-severity-explanation: Missing extern declaration for 
bpf_xdp_metadata_rx_checksum kfunc will cause BPF program build failure.

Reply via email to