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>
This commit is contained in:
Mickaël Salaün 2017-02-10 00:21:40 +01:00 committed by David S. Miller
parent 10ecc728fe
commit e5ff7c4019
6 changed files with 39 additions and 50 deletions

View file

@ -112,7 +112,7 @@ int bpf_map_update_elem(int fd, const void *key, const void *value,
return sys_bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));
}
int bpf_map_lookup_elem(int fd, void *key, void *value)
int bpf_map_lookup_elem(int fd, const void *key, void *value)
{
union bpf_attr attr;