diff options
| author | Stanislav Fomichev <sdf@google.com> | 2018-12-10 18:25:04 -0500 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-12-10 19:37:10 -0500 |
| commit | aca1a80ebe3e4d49adaf6516c61a6786b1ee7dad (patch) | |
| tree | 4dc038f5af8916a267ab904fbf3655044add62d5 /tools | |
| parent | c2a20a2731df11f9b7b7030f7ac3fc222c9ce39d (diff) | |
selftests/bpf: use proper type when passing prog_type
Use bpf_prog_type instead of bpf_map_type when passing prog_type.
-Wenum-conversion might be unhappy about it:
error: implicit conversion from enumeration type
'enum bpf_map_type' to different enumeration type
'enum bpf_prog_type'
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/bpf/test_verifier.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index d23929a1985d..37583267bdbc 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c | |||
| @@ -13940,7 +13940,7 @@ static int create_map(uint32_t type, uint32_t size_key, | |||
| 13940 | return fd; | 13940 | return fd; |
| 13941 | } | 13941 | } |
| 13942 | 13942 | ||
| 13943 | static int create_prog_dummy1(enum bpf_map_type prog_type) | 13943 | static int create_prog_dummy1(enum bpf_prog_type prog_type) |
| 13944 | { | 13944 | { |
| 13945 | struct bpf_insn prog[] = { | 13945 | struct bpf_insn prog[] = { |
| 13946 | BPF_MOV64_IMM(BPF_REG_0, 42), | 13946 | BPF_MOV64_IMM(BPF_REG_0, 42), |
| @@ -13951,7 +13951,7 @@ static int create_prog_dummy1(enum bpf_map_type prog_type) | |||
| 13951 | ARRAY_SIZE(prog), "GPL", 0, NULL, 0); | 13951 | ARRAY_SIZE(prog), "GPL", 0, NULL, 0); |
| 13952 | } | 13952 | } |
| 13953 | 13953 | ||
| 13954 | static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx) | 13954 | static int create_prog_dummy2(enum bpf_prog_type prog_type, int mfd, int idx) |
| 13955 | { | 13955 | { |
| 13956 | struct bpf_insn prog[] = { | 13956 | struct bpf_insn prog[] = { |
| 13957 | BPF_MOV64_IMM(BPF_REG_3, idx), | 13957 | BPF_MOV64_IMM(BPF_REG_3, idx), |
| @@ -13966,7 +13966,7 @@ static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx) | |||
| 13966 | ARRAY_SIZE(prog), "GPL", 0, NULL, 0); | 13966 | ARRAY_SIZE(prog), "GPL", 0, NULL, 0); |
| 13967 | } | 13967 | } |
| 13968 | 13968 | ||
| 13969 | static int create_prog_array(enum bpf_map_type prog_type, uint32_t max_elem, | 13969 | static int create_prog_array(enum bpf_prog_type prog_type, uint32_t max_elem, |
| 13970 | int p1key) | 13970 | int p1key) |
| 13971 | { | 13971 | { |
| 13972 | int p2key = 1; | 13972 | int p2key = 1; |
| @@ -14037,7 +14037,7 @@ static int create_cgroup_storage(bool percpu) | |||
| 14037 | 14037 | ||
| 14038 | static char bpf_vlog[UINT_MAX >> 8]; | 14038 | static char bpf_vlog[UINT_MAX >> 8]; |
| 14039 | 14039 | ||
| 14040 | static void do_test_fixup(struct bpf_test *test, enum bpf_map_type prog_type, | 14040 | static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type, |
| 14041 | struct bpf_insn *prog, int *map_fds) | 14041 | struct bpf_insn *prog, int *map_fds) |
| 14042 | { | 14042 | { |
| 14043 | int *fixup_map_hash_8b = test->fixup_map_hash_8b; | 14043 | int *fixup_map_hash_8b = test->fixup_map_hash_8b; |
