mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-11 02:59:07 +08:00
bpf: add _impl suffix for bpf_stream_vprintk() kfunc
Rename bpf_stream_vprintk() to bpf_stream_vprintk_impl(). This makes bpf_stream_vprintk() follow the already established "_impl" suffix-based naming convention for kfuncs with the bpf_prog_aux argument provided by the verifier implicitly. This convention will be taken advantage of with the upcoming KF_IMPLICIT_ARGS feature to preserve backwards compatibility to BPF programs. Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Link: https://lore.kernel.org/r/20251104-implv2-v3-2-4772b9ae0e06@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
This commit is contained in:
committed by
Andrii Nakryiko
parent
24a89cb35d
commit
a00b10df8c
@@ -315,20 +315,20 @@ enum libbpf_tristate {
|
|||||||
___param, sizeof(___param)); \
|
___param, sizeof(___param)); \
|
||||||
})
|
})
|
||||||
|
|
||||||
extern int bpf_stream_vprintk(int stream_id, const char *fmt__str, const void *args,
|
extern int bpf_stream_vprintk_impl(int stream_id, const char *fmt__str, const void *args,
|
||||||
__u32 len__sz, void *aux__prog) __weak __ksym;
|
__u32 len__sz, void *aux__prog) __weak __ksym;
|
||||||
|
|
||||||
#define bpf_stream_printk(stream_id, fmt, args...) \
|
#define bpf_stream_printk(stream_id, fmt, args...) \
|
||||||
({ \
|
({ \
|
||||||
static const char ___fmt[] = fmt; \
|
static const char ___fmt[] = fmt; \
|
||||||
unsigned long long ___param[___bpf_narg(args)]; \
|
unsigned long long ___param[___bpf_narg(args)]; \
|
||||||
\
|
\
|
||||||
_Pragma("GCC diagnostic push") \
|
_Pragma("GCC diagnostic push") \
|
||||||
_Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \
|
_Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \
|
||||||
___bpf_fill(___param, args); \
|
___bpf_fill(___param, args); \
|
||||||
_Pragma("GCC diagnostic pop") \
|
_Pragma("GCC diagnostic pop") \
|
||||||
\
|
\
|
||||||
bpf_stream_vprintk(stream_id, ___fmt, ___param, sizeof(___param), NULL);\
|
bpf_stream_vprintk_impl(stream_id, ___fmt, ___param, sizeof(___param), NULL); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Use __bpf_printk when bpf_printk call has 3 or fewer fmt args
|
/* Use __bpf_printk when bpf_printk call has 3 or fewer fmt args
|
||||||
|
|||||||
Reference in New Issue
Block a user