diff options
author | Martin KaFai Lau <kafai@fb.com> | 2018-08-08 10:01:27 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-08-11 01:58:46 +0200 |
commit | aa5f0c96cc7b96a678779055b2ff4cd9dabd8ba7 (patch) | |
tree | 3f842ab7be06a1846f5332821006bf6d892ddedf /tools/testing/selftests/bpf/test_btf.c | |
parent | bpf: Enable BPF_PROG_TYPE_SK_REUSEPORT bpf prog in reuseport selection (diff) | |
download | linux-aa5f0c96cc7b96a678779055b2ff4cd9dabd8ba7.tar.xz linux-aa5f0c96cc7b96a678779055b2ff4cd9dabd8ba7.zip |
bpf: Refactor ARRAY_SIZE macro to bpf_util.h
This patch refactors the ARRAY_SIZE macro to bpf_util.h.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_btf.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_btf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/test_btf.c b/tools/testing/selftests/bpf/test_btf.c index 7fa8c800c540..6b5cfeb7a9cc 100644 --- a/tools/testing/selftests/bpf/test_btf.c +++ b/tools/testing/selftests/bpf/test_btf.c @@ -19,6 +19,7 @@ #include <bpf/btf.h> #include "bpf_rlimit.h" +#include "bpf_util.h" static uint32_t pass_cnt; static uint32_t error_cnt; @@ -93,10 +94,6 @@ static int __base_pr(const char *format, ...) #define MAX_NR_RAW_TYPES 1024 #define BTF_LOG_BUF_SIZE 65535 -#ifndef ARRAY_SIZE -# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - static struct args { unsigned int raw_test_num; unsigned int file_test_num; |