summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_sockmap_kern.h
diff options
context:
space:
mode:
authorMichal Rostecki2019-05-23 14:53:54 +0200
committerAlexei Starovoitov2019-05-24 22:47:17 +0200
commit37739d1b4fe744da9c2f342224000ae7fbb5c063 (patch)
treea0caaaf379e92c3d5c0631e12d8284a27cd43402 /tools/testing/selftests/bpf/test_sockmap_kern.h
parentMerge branch 'bpf-explored-states' (diff)
downloadkernel-qcow2-linux-37739d1b4fe744da9c2f342224000ae7fbb5c063.tar.gz
kernel-qcow2-linux-37739d1b4fe744da9c2f342224000ae7fbb5c063.tar.xz
kernel-qcow2-linux-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/test_sockmap_kern.h')
-rw-r--r--tools/testing/selftests/bpf/test_sockmap_kern.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/test_sockmap_kern.h b/tools/testing/selftests/bpf/test_sockmap_kern.h
index e7639f66a941..4e7d3da21357 100644
--- a/tools/testing/selftests/bpf/test_sockmap_kern.h
+++ b/tools/testing/selftests/bpf/test_sockmap_kern.h
@@ -28,13 +28,6 @@
* are established and verdicts are decided.
*/
-#define bpf_printk(fmt, ...) \
-({ \
- char ____fmt[] = fmt; \
- bpf_trace_printk(____fmt, sizeof(____fmt), \
- ##__VA_ARGS__); \
-})
-
struct bpf_map_def SEC("maps") sock_map = {
.type = TEST_MAP_TYPE,
.key_size = sizeof(int),