bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christy Lee <christylee@fb.com>
To: <andrii@kernel.org>, <acme@kernel.org>
Cc: <christyc.y.lee@gmail.com>, <bpf@vger.kernel.org>,
	<kernel-team@fb.com>, <linux-perf-users@vger.kernel.org>,
	Christy Lee <christylee@fb.com>
Subject: [PATCH bpf-next 5/5] libbpf: deprecate bpf_map__def() API
Date: Wed, 5 Jan 2022 15:00:57 -0800	[thread overview]
Message-ID: <20220105230057.853163-6-christylee@fb.com> (raw)
In-Reply-To: <20220105230057.853163-1-christylee@fb.com>

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>
---
 tools/lib/bpf/libbpf.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 85dfef88b3d2..f6c1bc7d3de0 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -705,7 +705,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 */
-- 
2.30.2


      parent reply	other threads:[~2022-01-05 23:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 23:00 [PATCH bpf-next 0/5] libbpf 1.0: deprecate bpf_map__def() API Christy Lee
2022-01-05 23:00 ` [PATCH bpf-next 1/5] samples/bpf: stop using " Christy Lee
2022-01-05 23:00 ` [PATCH bpf-next 2/5] bpftool: " Christy Lee
2022-01-05 23:00 ` [PATCH bpf-next 3/5] perf: " Christy Lee
2022-01-06  0:20   ` Andrii Nakryiko
2022-01-06 20:24   ` Arnaldo Carvalho de Melo
2022-01-05 23:00 ` [PATCH bpf-next 4/5] selftests/bpf: " Christy Lee
2022-01-05 23:00 ` Christy Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220105230057.853163-6-christylee@fb.com \
    --to=christylee@fb.com \
    --cc=acme@kernel.org \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=christyc.y.lee@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).