aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_lpm_map.c
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2017-02-10 00:21:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-10 15:56:07 -0500
commitf4874d01beba16a1bf2512929b9d460e003d7f3d (patch)
treee43c59936314a8cc365a161a29e67b037553d4b0 /tools/testing/selftests/bpf/test_lpm_map.c
parentbpf: Use bpf_map_get_next_key() from the library (diff)
downloadlinux-dev-f4874d01beba16a1bf2512929b9d460e003d7f3d.tar.xz
linux-dev-f4874d01beba16a1bf2512929b9d460e003d7f3d.zip
bpf: Use bpf_create_map() from the library
Replace bpf_map_create() with bpf_create_map() 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_lpm_map.c')
-rw-r--r--tools/testing/selftests/bpf/test_lpm_map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/test_lpm_map.c b/tools/testing/selftests/bpf/test_lpm_map.c
index bd08394c26cb..3cc812cac2d7 100644
--- a/tools/testing/selftests/bpf/test_lpm_map.c
+++ b/tools/testing/selftests/bpf/test_lpm_map.c
@@ -183,7 +183,7 @@ static void test_lpm_map(int keysize)
key = alloca(sizeof(*key) + keysize);
memset(key, 0, sizeof(*key) + keysize);
- map = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE,
+ map = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE,
sizeof(*key) + keysize,
keysize + 1,
4096,
@@ -253,12 +253,12 @@ static void test_lpm_ipaddr(void)
key_ipv4 = alloca(key_size_ipv4);
key_ipv6 = alloca(key_size_ipv6);
- map_fd_ipv4 = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE,
+ map_fd_ipv4 = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE,
key_size_ipv4, sizeof(value),
100, BPF_F_NO_PREALLOC);
assert(map_fd_ipv4 >= 0);
- map_fd_ipv6 = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE,
+ map_fd_ipv6 = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE,
key_size_ipv6, sizeof(value),
100, BPF_F_NO_PREALLOC);
assert(map_fd_ipv6 >= 0);