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 |
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 --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);
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(+)