Replace bpf_prog_load() with bpf_load_program() calls.[...]
Signed-off-by: MickaÃl SalaÃn <mic@xxxxxxxxxxx>
Cc: Alexei Starovoitov <ast@xxxxxx>
Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
diff --git a/tools/testing/selftests/bpf/test_tag.c b/tools/testing/selftests/bpf/test_tag.c
index 5f7c602f47d1..b77dc4b03e77 100644
--- a/tools/testing/selftests/bpf/test_tag.c
+++ b/tools/testing/selftests/bpf/test_tag.c
@@ -16,6 +16,8 @@
#include <linux/bpf.h>
#include <linux/if_alg.h>
+#include <bpf/bpf.h>
+
#include "../../../include/linux/filter.h"
#include "bpf_sys.h"
@@ -55,8 +57,8 @@ static int bpf_try_load_prog(int insns, int fd_map,
int fd_prog;
bpf_filler(insns, fd_map);
- fd_prog = bpf_prog_load(BPF_PROG_TYPE_SCHED_CLS, prog, insns *
- sizeof(struct bpf_insn), "", NULL, 0);
+ fd_prog = bpf_load_program(BPF_PROG_TYPE_SCHED_CLS, prog, insns, "", 0,
+ NULL, 0);