aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_xdp_noinline.c
diff options
context:
space:
mode:
authorMichal Rostecki <mrostecki@opensuse.org>2019-05-23 14:53:54 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-05-24 13:47:17 -0700
commit37739d1b4fe744da9c2f342224000ae7fbb5c063 (patch)
treea0caaaf379e92c3d5c0631e12d8284a27cd43402 /tools/testing/selftests/bpf/progs/test_xdp_noinline.c
parentMerge branch 'bpf-explored-states' (diff)
downloadlinux-dev-37739d1b4fe744da9c2f342224000ae7fbb5c063.tar.xz
linux-dev-37739d1b4fe744da9c2f342224000ae7fbb5c063.zip
selftests: bpf: Move bpf_printk to bpf_helpers.h
bpf_printk is a macro which is commonly used to print out debug messages in BPF programs and it was copied in many selftests and samples. Since all of them include bpf_helpers.h, this change moves the macro there. Signed-off-by: Michal Rostecki <mrostecki@opensuse.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_xdp_noinline.c')
-rw-r--r--tools/testing/selftests/bpf/progs/test_xdp_noinline.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_xdp_noinline.c b/tools/testing/selftests/bpf/progs/test_xdp_noinline.c
index 5e4aac74f9d0..4fe6aaad22a4 100644
--- a/tools/testing/selftests/bpf/progs/test_xdp_noinline.c
+++ b/tools/testing/selftests/bpf/progs/test_xdp_noinline.c
@@ -15,13 +15,6 @@
#include <linux/udp.h>
#include "bpf_helpers.h"
-#define bpf_printk(fmt, ...) \
-({ \
- char ____fmt[] = fmt; \
- bpf_trace_printk(____fmt, sizeof(____fmt), \
- ##__VA_ARGS__); \
-})
-
static __u32 rol32(__u32 word, unsigned int shift)
{
return (word << shift) | (word >> ((-shift) & 31));