]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
selftests/bpf: Use vmlinux.h in test_xdp_meta
authorIhor Solodrai <ihor.solodrai@linux.dev>
Wed, 18 Feb 2026 21:56:50 +0000 (13:56 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 18 Feb 2026 22:58:47 +0000 (14:58 -0800)
- Replace linux/* includes with vmlinux.h
- Include errno.h
- Include bpf_tracing_net.h for TC_ACT_* and ETH_*
- Use BPF_STDERR instead of BPF_STREAM_STDERR

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260218215651.2057673-2-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/test_xdp_meta.c

index 0a0f371a2deccda35cc0e39f386fc2c5f9368e02..fa73b17cb999338bd87f5093ba8d68fe82e8054e 100644 (file)
@@ -1,12 +1,12 @@
-#include <stdbool.h>
-#include <linux/bpf.h>
-#include <linux/errno.h>
-#include <linux/if_ether.h>
-#include <linux/pkt_cls.h>
+// SPDX-License-Identifier: GPL-2.0
+#include <vmlinux.h>
 
 #include <bpf/bpf_endian.h>
 #include <bpf/bpf_helpers.h>
+#include <errno.h>
+
 #include "bpf_kfuncs.h"
+#include "bpf_tracing_net.h"
 
 #define META_SIZE 32
 
@@ -42,7 +42,7 @@ static bool check_metadata(const char *file, int line, __u8 *meta_have)
        if (!__builtin_memcmp(meta_have, meta_want, META_SIZE))
                return true;
 
-       bpf_stream_printk(BPF_STREAM_STDERR,
+       bpf_stream_printk(BPF_STDERR,
                          "FAIL:%s:%d: metadata mismatch\n"
                          "  have:\n    %pI6\n    %pI6\n"
                          "  want:\n    %pI6\n    %pI6\n",