diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-02-10 00:21:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-10 15:56:06 -0500 |
commit | 2ee89fb9a942e250b5adb5535de4acca14bb7fa2 (patch) | |
tree | a2a05ae382318bb1a863aa8afee37055409e521c /tools/testing/selftests/bpf/test_tag.c | |
parent | d02d8986a7688d3f0ff6ef61aa6beb41427692eb (diff) |
bpf: Use bpf_load_program() from the library
Replace bpf_prog_load() with bpf_load_program() calls.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tag.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_tag.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/test_tag.c b/tools/testing/selftests/bpf/test_tag.c index 5f7c602f47d1..dc209721ffd5 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); assert(fd_prog > 0); if (fd_map > 0) bpf_filler(insns, 0); |