diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-02-10 00:21:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-10 15:56:07 -0500 |
commit | e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70 (patch) | |
tree | c3060074ae5ccfa0ddb873d09ab08e4992de855a /tools/lib/bpf | |
parent | 10ecc728fe12dbd206e2d4d8b6e96082632b969c (diff) | |
download | linux-e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70.tar.gz linux-e5ff7c4019c6cb6e86bc9d6d16e8a8f921133c70.tar.bz2 linux-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/lib/bpf')
-rw-r--r-- | tools/lib/bpf/bpf.c | 2 | ||||
-rw-r--r-- | tools/lib/bpf/bpf.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 1de762677a2f..b1a1f58b99e0 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c @@ -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; diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index 2458534c8b33..171cf594f782 100644 --- a/tools/lib/bpf/bpf.h +++ b/tools/lib/bpf/bpf.h @@ -36,7 +36,7 @@ int bpf_load_program(enum bpf_prog_type type, const struct bpf_insn *insns, int bpf_map_update_elem(int fd, const void *key, const void *value, __u64 flags); -int bpf_map_lookup_elem(int fd, void *key, void *value); +int bpf_map_lookup_elem(int fd, const void *key, void *value); int bpf_map_delete_elem(int fd, void *key); int bpf_map_get_next_key(int fd, void *key, void *next_key); int bpf_obj_pin(int fd, const char *pathname); |