summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/sockmap_verdict_prog.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/sockmap_verdict_prog.c
parent5762a20b11ef261ae8436868555fab4340cb3ca0 (diff)
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/sockmap_verdict_prog.c')
-rw-r--r--tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c b/tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c
index 2ce7634a4012..bdc22be46f2e 100644
--- a/tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c
+++ b/tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c
@@ -5,13 +5,6 @@
int _version SEC("version") = 1;
-#define bpf_printk(fmt, ...) \
-({ \
- char ____fmt[] = fmt; \
- bpf_trace_printk(____fmt, sizeof(____fmt), \
- ##__VA_ARGS__); \
-})
-
struct bpf_map_def SEC("maps") sock_map_rx = {
.type = BPF_MAP_TYPE_SOCKMAP,
.key_size = sizeof(int),