]> git.ipfire.org Git - thirdparty/linux.git/commit
libbpf: Add bpf_stream_printk() macro
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 3 Jul 2025 20:48:15 +0000 (13:48 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Jul 2025 02:30:07 +0000 (19:30 -0700)
commit21a3afc76a317b9fb214c5afcfd5e1587b2ae9b3
treeae96587b69145b4d1f1e383c516e7916d6be93d9
parentecec5b5743bf964f3e2bb5486daee058344d9066
libbpf: Add bpf_stream_printk() macro

Add a convenience macro to print data to the BPF streams. BPF_STDOUT and
BPF_STDERR stream IDs in the vmlinux.h can be passed to the macro to
print to the respective streams.

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250703204818.925464-10-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf_helpers.h