aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bpf_sys.h
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2017-02-10 00:21:40 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-10 15:56:07 -0500
commite5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70 (patch)
treec3060074ae5ccfa0ddb873d09ab08e4992de855a /tools/testing/selftests/bpf/bpf_sys.h
parentbpf: Use bpf_map_update_elem() from the library (diff)
downloadlinux-dev-e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70.tar.xz
linux-dev-e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70.zip
bpf: Use bpf_map_lookup_elem() from the library
Replace bpf_map_lookup() with bpf_map_lookup_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.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/tools/testing/selftests/bpf/bpf_sys.h b/tools/testing/selftests/bpf/bpf_sys.h
index e08dec0db9e0..0a5a6060db70 100644
--- a/tools/testing/selftests/bpf/bpf_sys.h
+++ b/tools/testing/selftests/bpf/bpf_sys.h
@@ -24,17 +24,6 @@ static inline int bpf(int cmd, union bpf_attr *attr, unsigned int size)
#endif
}
-static inline int bpf_map_lookup(int fd, const void *key, void *value)
-{
- union bpf_attr attr = {};
-
- attr.map_fd = fd;
- attr.key = bpf_ptr_to_u64(key);
- attr.value = bpf_ptr_to_u64(value);
-
- return bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));
-}
-
static inline int bpf_map_delete(int fd, const void *key)
{
union bpf_attr attr = {};