bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] libbpf 1.0: deprecate bpf_object__find_map_by_offset() API
@ 2022-01-05  0:31 Christy Lee
  2022-01-06  0:11 ` Andrii Nakryiko
  0 siblings, 1 reply; 2+ messages in thread
From: Christy Lee @ 2022-01-05  0:31 UTC (permalink / raw)
  To: andrii, acme; +Cc: christyc.y.lee, bpf, kernel-team, Christy Lee

API created with simplistic assumptions about BPF map definitions.
It hasn’t worked for a while, deprecate it in preparation for
libbpf 1.0.

[0] Closes: https://github.com/libbpf/libbpf/issues/302

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..8a86d7e614bc 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -677,7 +677,8 @@ bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name);
  * Get bpf_map through the offset of corresponding struct bpf_map_def
  * in the BPF object file.
  */
-LIBBPF_API struct bpf_map *
+LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 8, "function has no effect")
+struct bpf_map *
 bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset);
 
 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__next_map() instead")
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next] libbpf 1.0: deprecate bpf_object__find_map_by_offset() API
  2022-01-05  0:31 [PATCH bpf-next] libbpf 1.0: deprecate bpf_object__find_map_by_offset() API Christy Lee
@ 2022-01-06  0:11 ` Andrii Nakryiko
  0 siblings, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2022-01-06  0:11 UTC (permalink / raw)
  To: Christy Lee
  Cc: Andrii Nakryiko, Arnaldo Carvalho de Melo, Christy Lee, bpf,
	Kernel Team

On Tue, Jan 4, 2022 at 4:31 PM Christy Lee <christylee@fb.com> wrote:
>
> API created with simplistic assumptions about BPF map definitions.
> It hasn’t worked for a while, deprecate it in preparation for
> libbpf 1.0.
>
> [0] Closes: https://github.com/libbpf/libbpf/issues/302
>
> Signed-off-by: Christy Lee <christylee@fb.com>
> ---
>  tools/lib/bpf/libbpf.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>

Applied to bpf-next, thanks.

> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
> index 85dfef88b3d2..8a86d7e614bc 100644
> --- a/tools/lib/bpf/libbpf.h
> +++ b/tools/lib/bpf/libbpf.h
> @@ -677,7 +677,8 @@ bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name);
>   * Get bpf_map through the offset of corresponding struct bpf_map_def
>   * in the BPF object file.
>   */
> -LIBBPF_API struct bpf_map *
> +LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 8, "function has no effect")
> +struct bpf_map *
>  bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset);
>
>  LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__next_map() instead")
> --
> 2.30.2
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-06  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05  0:31 [PATCH bpf-next] libbpf 1.0: deprecate bpf_object__find_map_by_offset() API Christy Lee
2022-01-06  0:11 ` Andrii Nakryiko

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).