diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-02-10 02:21:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-10 23:56:07 +0300 |
commit | 10ecc728fe12dbd206e2d4d8b6e96082632b969c (patch) | |
tree | 1bf0ee12402d6dcd7667e799d7518d565e683743 /tools/testing/selftests/bpf/bpf_sys.h | |
parent | 2ee89fb9a942e250b5adb5535de4acca14bb7fa2 (diff) | |
download | linux-10ecc728fe12dbd206e2d4d8b6e96082632b969c.tar.xz |
bpf: Use bpf_map_update_elem() from the library
Replace bpf_map_update() with bpf_map_update_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/bpf_sys.h')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_sys.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/testing/selftests/bpf/bpf_sys.h b/tools/testing/selftests/bpf/bpf_sys.h index e7bbe3e5402e..e08dec0db9e0 100644 --- a/tools/testing/selftests/bpf/bpf_sys.h +++ b/tools/testing/selftests/bpf/bpf_sys.h @@ -35,19 +35,6 @@ static inline int bpf_map_lookup(int fd, const void *key, void *value) return bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr)); } -static inline int bpf_map_update(int fd, const void *key, const void *value, - uint64_t flags) -{ - union bpf_attr attr = {}; - - attr.map_fd = fd; - attr.key = bpf_ptr_to_u64(key); - attr.value = bpf_ptr_to_u64(value); - attr.flags = flags; - - return bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr)); -} - static inline int bpf_map_delete(int fd, const void *key) { union bpf_attr attr = {}; |