summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-02-19 01:58:47 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-02-19 01:59:00 +0300
commitf06eab00e2e0b8a190f44c5b0ceeb19a73462e38 (patch)
tree950bc42df6b194cbca95209abb031c91431c2fb1 /tools
parent3b39d73cc3379360a33eb583b17f21fe55e1288e (diff)
parent0cecd492f5165d3e7a314b87e9b7787734eab324 (diff)
downloadlinux-f06eab00e2e0b8a190f44c5b0ceeb19a73462e38.tar.xz
Merge branch 'libbpf-remove-extern-declaration-of-bpf_stream_vprintk'
Ihor Solodrai says: ==================== libbpf: Remove extern declaration of bpf_stream_vprintk() The first patch adjusts a selftest that has been using bpf_stream_printk() macro. The second patch removes the declaration. ==================== Link: https://patch.msgid.link/20260218215651.2057673-1-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/bpf/bpf_helpers.h3
-rw-r--r--tools/testing/selftests/bpf/progs/test_xdp_meta.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index c145da05a67c..9d160b5b9c0e 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -315,9 +315,6 @@ enum libbpf_tristate {
___param, sizeof(___param)); \
})
-extern int bpf_stream_vprintk(int stream_id, const char *fmt__str, const void *args,
- __u32 len__sz) __weak __ksym;
-
#define bpf_stream_printk(stream_id, fmt, args...) \
({ \
static const char ___fmt[] = fmt; \
diff --git a/tools/testing/selftests/bpf/progs/test_xdp_meta.c b/tools/testing/selftests/bpf/progs/test_xdp_meta.c
index 0a0f371a2dec..fa73b17cb999 100644
--- a/tools/testing/selftests/bpf/progs/test_xdp_meta.c
+++ b/tools/testing/selftests/bpf/progs/test_xdp_meta.c
@@ -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",