diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-02-10 00:21:41 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-10 15:56:07 -0500 |
commit | e58383b803499bd623b737070038af94d0b8a3c7 (patch) | |
tree | 8878490cce2abb40872e9e33b0b41b21aaaa8d3b /tools/testing/selftests/bpf/test_lru_map.c | |
parent | e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70 (diff) | |
download | linux-e58383b803499bd623b737070038af94d0b8a3c7.tar.gz linux-e58383b803499bd623b737070038af94d0b8a3c7.tar.bz2 linux-e58383b803499bd623b737070038af94d0b8a3c7.zip |
bpf: Use bpf_map_delete_elem() from the library
Replace bpf_map_delete() with bpf_map_delete_elem() 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_lru_map.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_lru_map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/test_lru_map.c b/tools/testing/selftests/bpf/test_lru_map.c index eccf6d96e551..859c940a6e41 100644 --- a/tools/testing/selftests/bpf/test_lru_map.c +++ b/tools/testing/selftests/bpf/test_lru_map.c @@ -324,7 +324,7 @@ static void test_lru_sanity2(int map_type, int map_flags, unsigned int tgt_free) if (map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH) { assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); - assert(!bpf_map_delete(lru_map_fd, &key)); + assert(!bpf_map_delete_elem(lru_map_fd, &key)); } else { assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST)); @@ -483,8 +483,8 @@ static void test_lru_sanity4(int map_type, int map_flags, unsigned int tgt_free) } for (; key <= 2 * tgt_free; key++) { - assert(!bpf_map_delete(lru_map_fd, &key)); - assert(bpf_map_delete(lru_map_fd, &key)); + assert(!bpf_map_delete_elem(lru_map_fd, &key)); + assert(bpf_map_delete_elem(lru_map_fd, &key)); } end_key = key + 2 * tgt_free; |