BPF List
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Dave Marchevsky <davemarchevsky@fb.com>
Cc: bpf <bpf@vger.kernel.org>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>,
	Song Liu <songliubraving@fb.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v2 bpf-next 4/4] libbpf: deprecate bpf_program__get_prog_info_linear
Date: Wed, 20 Oct 2021 23:01:08 +0200	[thread overview]
Message-ID: <87o87je7hn.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4BzbY+OMR_=JJHdzJpiuar_giusd0sb1LKoCQ7BEDYh57NQ@mail.gmail.com>

Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:

> On Mon, Oct 11, 2021 at 1:20 AM Dave Marchevsky <davemarchevsky@fb.com> wrote:
>>
>> As part of the road to libbpf 1.0, and discussed in libbpf issue tracker
>> [0], bpf_program__get_prog_info_linear and its associated structs and
>> helper functions should be deprecated. The functionality is too specific
>> to the needs of 'perf', and there's little/no out-of-tree usage to
>> preclude introduction of a more general helper in the future.
>>
>> [0] Closes: https://github.com/libbpf/libbpf/issues/313
>
> styling nit: don't know if it's described anywhere or not, but when
> people do references like this, they use 2 spaces of indentation. No
> idea how it came to be, but that's what I did for a while and see
> others doing the same.
>
>>
>> Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
>> ---
>>  tools/lib/bpf/libbpf.h | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
>> index 89ca9c83ed4e..285008b46e1b 100644
>> --- a/tools/lib/bpf/libbpf.h
>> +++ b/tools/lib/bpf/libbpf.h
>> @@ -877,12 +877,15 @@ struct bpf_prog_info_linear {
>>         __u8                    data[];
>>  };
>>
>> +LIBBPF_DEPRECATED_SINCE(0, 7, "use a custom linear prog_info wrapper")
>>  LIBBPF_API struct bpf_prog_info_linear *
>>  bpf_program__get_prog_info_linear(int fd, __u64 arrays);
>>
>> +LIBBPF_DEPRECATED_SINCE(0, 7, "use a custom linear prog_info wrapper")
>>  LIBBPF_API void
>>  bpf_program__bpil_addr_to_offs(struct bpf_prog_info_linear *info_linear);
>>
>> +LIBBPF_DEPRECATED_SINCE(0, 7, "use a custom linear prog_info wrapper")
>
> we can actually deprecate all this starting from v0.6, because perf is
> building libbpf statically, so no worries about releases (also there
> are no replacement APIs we have to wait full release for)

Just FYI, we're also using this in libxdp, and that does link
dynamically to libbpf. It's not an issue to move away from it[0], but
perf is not the only user :)

-Toke

[0] Track that here: https://github.com/xdp-project/xdp-tools/issues/127


  reply	other threads:[~2021-10-20 21:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  8:20 [PATCH v2 bpf-next 0/4] libbpf: deprecate bpf_program__get_prog_info_linear Dave Marchevsky
2021-10-11  8:20 ` [PATCH v2 bpf-next 1/4] libbpf: migrate internal use of bpf_program__get_prog_info_linear Dave Marchevsky
2021-10-20 17:36   ` Andrii Nakryiko
2021-10-11  8:20 ` [PATCH v2 bpf-next 2/4] bpftool: use bpf_obj_get_info_by_fd directly Dave Marchevsky
2021-10-20 17:37   ` Andrii Nakryiko
2021-10-20 22:15     ` Quentin Monnet
2021-10-11  8:20 ` [PATCH v2 bpf-next 3/4] perf: pull in bpf_program__get_prog_info_linear Dave Marchevsky
2021-10-20 17:37   ` Andrii Nakryiko
     [not found]     ` <5080FF1F-8E7A-4AF7-AD7E-7349E58CFEDB@fb.com>
2021-10-31 17:13       ` Arnaldo Carvalho de Melo
2021-10-11  8:20 ` [PATCH v2 bpf-next 4/4] libbpf: deprecate bpf_program__get_prog_info_linear Dave Marchevsky
2021-10-20 17:37   ` Andrii Nakryiko
2021-10-20 21:01     ` Toke Høiland-Jørgensen [this message]
     [not found]       ` <d3de589a-21f3-7a0d-59de-126d3c70fba1@fb.com>
2021-10-22 19:26         ` Andrii Nakryiko

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=87o87je7hn.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davemarchevsky@fb.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    /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