Re: [PATCH bpf-next v2] libbpf: Deprecate bpf_object__unload() API since v0.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 4, 2021 at 6:06 PM Song Liu <song@xxxxxxxxxx> wrote:
>
> On Sat, Oct 2, 2021 at 9:31 AM Hengqi Chen <hengqi.chen@xxxxxxxxx> 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@xxxxxxxxx>
>
> Acked-by: Song Liu <songliubraving@xxxxxx>

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.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux