diff options
author | Michal Rostecki <mrostecki@opensuse.org> | 2019-05-23 14:53:54 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-05-24 13:47:17 -0700 |
commit | 37739d1b4fe744da9c2f342224000ae7fbb5c063 (patch) | |
tree | a0caaaf379e92c3d5c0631e12d8284a27cd43402 /tools/testing/selftests/bpf/progs/test_lwt_seg6local.c | |
parent | 5762a20b11ef261ae8436868555fab4340cb3ca0 (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/test_lwt_seg6local.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_lwt_seg6local.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_lwt_seg6local.c b/tools/testing/selftests/bpf/progs/test_lwt_seg6local.c index 0575751bc1bc..7c7cb3177463 100644 --- a/tools/testing/selftests/bpf/progs/test_lwt_seg6local.c +++ b/tools/testing/selftests/bpf/progs/test_lwt_seg6local.c @@ -6,13 +6,6 @@ #include "bpf_helpers.h" #include "bpf_endian.h" -#define bpf_printk(fmt, ...) \ -({ \ - char ____fmt[] = fmt; \ - bpf_trace_printk(____fmt, sizeof(____fmt), \ - ##__VA_ARGS__); \ -}) - /* Packet parsing state machine helpers. */ #define cursor_advance(_cursor, _len) \ ({ void *_tmp = _cursor; _cursor += _len; _tmp; }) |