Commit aca1a80e authored by Stanislav Fomichev's avatar Stanislav Fomichev Committed by Daniel Borkmann

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: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent c2a20a27
...@@ -13940,7 +13940,7 @@ static int create_map(uint32_t type, uint32_t size_key, ...@@ -13940,7 +13940,7 @@ static int create_map(uint32_t type, uint32_t size_key,
return fd; return fd;
} }
static int create_prog_dummy1(enum bpf_map_type prog_type) static int create_prog_dummy1(enum bpf_prog_type prog_type)
{ {
struct bpf_insn prog[] = { struct bpf_insn prog[] = {
BPF_MOV64_IMM(BPF_REG_0, 42), BPF_MOV64_IMM(BPF_REG_0, 42),
...@@ -13951,7 +13951,7 @@ static int create_prog_dummy1(enum bpf_map_type prog_type) ...@@ -13951,7 +13951,7 @@ static int create_prog_dummy1(enum bpf_map_type prog_type)
ARRAY_SIZE(prog), "GPL", 0, NULL, 0); ARRAY_SIZE(prog), "GPL", 0, NULL, 0);
} }
static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx) static int create_prog_dummy2(enum bpf_prog_type prog_type, int mfd, int idx)
{ {
struct bpf_insn prog[] = { struct bpf_insn prog[] = {
BPF_MOV64_IMM(BPF_REG_3, idx), 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,7 +13966,7 @@ static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx)
ARRAY_SIZE(prog), "GPL", 0, NULL, 0); ARRAY_SIZE(prog), "GPL", 0, NULL, 0);
} }
static int create_prog_array(enum bpf_map_type prog_type, uint32_t max_elem, static int create_prog_array(enum bpf_prog_type prog_type, uint32_t max_elem,
int p1key) int p1key)
{ {
int p2key = 1; int p2key = 1;
...@@ -14037,7 +14037,7 @@ static int create_cgroup_storage(bool percpu) ...@@ -14037,7 +14037,7 @@ static int create_cgroup_storage(bool percpu)
static char bpf_vlog[UINT_MAX >> 8]; static char bpf_vlog[UINT_MAX >> 8];
static void do_test_fixup(struct bpf_test *test, enum bpf_map_type prog_type, static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type,
struct bpf_insn *prog, int *map_fds) struct bpf_insn *prog, int *map_fds)
{ {
int *fixup_map_hash_8b = test->fixup_map_hash_8b; int *fixup_map_hash_8b = test->fixup_map_hash_8b;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment