Commit f06eab00 authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

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: default avatarAlexei Starovoitov <ast@kernel.org>
parents 3b39d73c 0cecd492
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;						\
+6 −6
Original line number Diff line number Diff line
#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",