All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2] libbpf: Remove deprecated bpf_object__find_map_by_offset
@ 2021-07-23  7:43 Tal Lossos
  2021-07-24  0:02 ` Andrii Nakryiko
  0 siblings, 1 reply; 2+ messages in thread
From: Tal Lossos @ 2021-07-23  7:43 UTC (permalink / raw)
  To: bpf; +Cc: andrii, Tal Lossos

Removing bpf_object__find_map_by_offset as part of the effort to move
towards a v1.0 for libbpf: https://github.com/libbpf/libbpf/issues/302.

Signed-off-by: Tal Lossos <tallossos@gmail.com>
---
 tools/lib/bpf/libbpf.c | 6 ------
 tools/lib/bpf/libbpf.h | 7 -------
 2 files changed, 13 deletions(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 4c153c379989..6b021b893579 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -9956,12 +9956,6 @@ bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name)
 	return bpf_map__fd(bpf_object__find_map_by_name(obj, name));
 }
 
-struct bpf_map *
-bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset)
-{
-	return libbpf_err_ptr(-ENOTSUP);
-}
-
 long libbpf_get_error(const void *ptr)
 {
 	if (!IS_ERR_OR_NULL(ptr))
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 6b08c1023609..1de34b315277 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -422,13 +422,6 @@ bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name);
 LIBBPF_API int
 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 *
-bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset);
-
 LIBBPF_API struct bpf_map *
 bpf_map__next(const struct bpf_map *map, const struct bpf_object *obj);
 #define bpf_object__for_each_map(pos, obj)		\
-- 
2.27.0


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

* Re: [PATCH bpf-next v2] libbpf: Remove deprecated bpf_object__find_map_by_offset
  2021-07-23  7:43 [PATCH bpf-next v2] libbpf: Remove deprecated bpf_object__find_map_by_offset Tal Lossos
@ 2021-07-24  0:02 ` Andrii Nakryiko
  0 siblings, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2021-07-24  0:02 UTC (permalink / raw)
  To: Tal Lossos; +Cc: bpf, Andrii Nakryiko

On Fri, Jul 23, 2021 at 12:43 AM Tal Lossos <tallossos@gmail.com> wrote:
>
> Removing bpf_object__find_map_by_offset as part of the effort to move
> towards a v1.0 for libbpf: https://github.com/libbpf/libbpf/issues/302.
>
> Signed-off-by: Tal Lossos <tallossos@gmail.com>
> ---

As explained before, I can't apply this just yet. We'll start removing
APIs right before 1.0 release. I'll update the issue mentioning this.

>  tools/lib/bpf/libbpf.c | 6 ------
>  tools/lib/bpf/libbpf.h | 7 -------
>  2 files changed, 13 deletions(-)
>

[...]

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

end of thread, other threads:[~2021-07-24  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  7:43 [PATCH bpf-next v2] libbpf: Remove deprecated bpf_object__find_map_by_offset Tal Lossos
2021-07-24  0:02 ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.