Skip to content

Commit b3dfa12

Browse files
theihorAlexei Starovoitov
authored andcommitted
selftests/bpf: Use vmlinux.h in test_xdp_meta
- 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>
1 parent 3b39d73 commit b3dfa12

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tools/testing/selftests/bpf/progs/test_xdp_meta.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#include <stdbool.h>
2-
#include <linux/bpf.h>
3-
#include <linux/errno.h>
4-
#include <linux/if_ether.h>
5-
#include <linux/pkt_cls.h>
1+
// SPDX-License-Identifier: GPL-2.0
2+
#include <vmlinux.h>
63

74
#include <bpf/bpf_endian.h>
85
#include <bpf/bpf_helpers.h>
6+
#include <errno.h>
7+
98
#include "bpf_kfuncs.h"
9+
#include "bpf_tracing_net.h"
1010

1111
#define META_SIZE 32
1212

@@ -42,7 +42,7 @@ static bool check_metadata(const char *file, int line, __u8 *meta_have)
4242
if (!__builtin_memcmp(meta_have, meta_want, META_SIZE))
4343
return true;
4444

45-
bpf_stream_printk(BPF_STREAM_STDERR,
45+
bpf_stream_printk(BPF_STDERR,
4646
"FAIL:%s:%d: metadata mismatch\n"
4747
" have:\n %pI6\n %pI6\n"
4848
" want:\n %pI6\n %pI6\n",

0 commit comments

Comments
 (0)