aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorChristy Lee <christylee@fb.com>2022-01-07 16:42:18 -0800
committerAndrii Nakryiko <andrii@kernel.org>2022-01-12 17:01:39 -0800
commit063fa26aab7d4b987b2c797d12dc457a475011e5 (patch)
tree7db88f835f95f7935c9a84558dc556a68312ca00 /tools/lib/bpf/libbpf.h
parentselftests/bpf: Stop using bpf_map__def() API (diff)
downloadlinux-dev-063fa26aab7d4b987b2c797d12dc457a475011e5.tar.xz
linux-dev-063fa26aab7d4b987b2c797d12dc457a475011e5.zip
libbpf: Deprecate bpf_map__def() API
All fields accessed via bpf_map_def can now be accessed via appropirate getters and setters. Mark bpf_map__def() API as deprecated. Signed-off-by: Christy Lee <christylee@fb.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220108004218.355761-6-christylee@fb.com
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r--tools/lib/bpf/libbpf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 8b9bc5e90c2b..9728551501ae 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -706,7 +706,8 @@ bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *map);
LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
/* get map definition */
-LIBBPF_API const struct bpf_map_def *bpf_map__def(const struct bpf_map *map);
+LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 8, "use appropriate getters or setters instead")
+const struct bpf_map_def *bpf_map__def(const struct bpf_map *map);
/* get map name */
LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
/* get/set map type */