All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Song Liu <song@kernel.org>
Cc: Hengqi Chen <hengqi.chen@gmail.com>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>
Subject: Re: [PATCH bpf-next v2] libbpf: Deprecate bpf_object__unload() API since v0.7
Date: Wed, 6 Oct 2021 10:39:06 -0700	[thread overview]
Message-ID: <CAEf4BzZ_JB1VLAF0=7gu=2M0M735aXava=nPL8m8ewQWdS3m8g@mail.gmail.com> (raw)
In-Reply-To: <CAPhsuW7GxToBCDVzD+H-83NAJw-a-EraNVD=+xcFfGqKduejUw@mail.gmail.com>

On Mon, Oct 4, 2021 at 6:06 PM Song Liu <song@kernel.org> wrote:
>
> On Sat, Oct 2, 2021 at 9:31 AM Hengqi Chen <hengqi.chen@gmail.com> wrote:
> >
> > BPF objects are not re-loadable after unload. User are expected to use
> > bpf_object__close() to unload and free up resources in one operation.
> > No need to expose bpf_object__unload() as a public API, deprecate it.[0]
> > Add bpf_object_unload() as an alias to bpf_object__unload() and replace
> > all bpf_object__unload() to avoid compilation errors.
> >
> >   [0] Closes: https://github.com/libbpf/libbpf/issues/290
> >
> > Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>

Applied to bpf-next, thanks. I've done few changes, though:

1. started deprecation from the current development version (0.6),
there is no point in delaying this as the recommended replacement API
(bpf_object__close()) has been available forever.
2. it didn't make sense to me to have bpf_object_unload as an alias to
bpf_object__unload, I switched it around, bpf_object__unload is an
alias of internal bpf_object_unload. It will also make further
deletion of bpf_object__unload() simpler in the future.

Please let me know if you have any reservations about this.

      reply	other threads:[~2021-10-06 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 16:10 [PATCH bpf-next v2] libbpf: Deprecate bpf_object__unload() API since v0.7 Hengqi Chen
2021-10-05  1:06 ` Song Liu
2021-10-06 17:39   ` Andrii Nakryiko [this message]

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='CAEf4BzZ_JB1VLAF0=7gu=2M0M735aXava=nPL8m8ewQWdS3m8g@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hengqi.chen@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=song@kernel.org \
    --cc=yhs@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 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.