libbpf: Deprecate bpf_object__unload() API since v0.6
authorHengqi Chen <hengqi.chen@gmail.com>
Sat, 2 Oct 2021 16:10:00 +0000 (00:10 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 6 Oct 2021 19:34:02 +0000 (12:34 -0700)
commit4a404a7e8a3902fc560527241a611186605efb4e
tree0a71a79daf3e7f73f274e34798e8b40e824c927f
parent9330303446382a33aa62a8a88a7a48555f76df0b
libbpf: Deprecate bpf_object__unload() API since v0.6

BPF objects are not reloadable after unload. Users 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 internal
bpf_object_unload() and replace all bpf_object__unload() uses to avoid
compilation errors.

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

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211002161000.3854559-1-hengqi.chen@gmail.com
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h