diff mbox series

[v2,bpf-next,4/4] libbpf: Mark bpf_object__find_program_by_title API deprecated.

Message ID 20211211003608.2764928-5-kuifeng@fb.com (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series Stop using bpf_object__find_program_by_title API | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 6 maintainers not CCed: netdev@vger.kernel.org kafai@fb.com songliubraving@fb.com john.fastabend@gmail.com kpsingh@kernel.org yhs@fb.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 24 this patch: 24
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next fail VM_Test
bpf/vmtest-bpf-next-PR fail PR summary

Commit Message

Kui-Feng Lee Dec. 11, 2021, 12:36 a.m. UTC
Deprecate this API since v0.7.  All callers should move to
bpf_object__find_program_by_name if possible, otherwise use
bpf_object__for_each_program to find a program out from a given
section.

Signed-off-by: Kui-Feng Lee <kuifeng@fb.com>
---
 tools/lib/bpf/libbpf.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrii Nakryiko Dec. 13, 2021, 10:19 p.m. UTC | #1
On Fri, Dec 10, 2021 at 4:36 PM Kui-Feng Lee <kuifeng@fb.com> wrote:
>
> Deprecate this API since v0.7.  All callers should move to
> bpf_object__find_program_by_name if possible, otherwise use
> bpf_object__for_each_program to find a program out from a given
> section.
>
> Signed-off-by: Kui-Feng Lee <kuifeng@fb.com>
> ---

Forgot to mention that it would be good to add:

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

So that when this patch is synced into Github's mirror it will
auto-close that issue. Please add in the next revision.


>  tools/lib/bpf/libbpf.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
> index 4802c1e736c3..cd9dec4def41 100644
> --- a/tools/lib/bpf/libbpf.h
> +++ b/tools/lib/bpf/libbpf.h
> @@ -187,6 +187,7 @@ struct btf;
>  LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
>  LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
>
> +LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__find_program_by_name() instead")
>  LIBBPF_API struct bpf_program *
>  bpf_object__find_program_by_title(const struct bpf_object *obj,
>                                   const char *title);
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index 4802c1e736c3..cd9dec4def41 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -187,6 +187,7 @@  struct btf;
 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
 
+LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__find_program_by_name() instead")
 LIBBPF_API struct bpf_program *
 bpf_object__find_program_by_title(const struct bpf_object *obj,
 				  const char *title);