]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Remove unused bpf_link's destroy operation, but add dealloc
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 15 Aug 2021 07:06:01 +0000 (00:06 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 16 Aug 2021 22:45:08 +0000 (00:45 +0200)
commit8067a3e51fd5d500d33d047d21e37c52d8d4081a
tree87f98a8a452ef4909d26140fec63a4e5016ad93d
parent3bbe8441c6fd1b56e07e4de44829bbdb47a7177b
libbpf: Remove unused bpf_link's destroy operation, but add dealloc

bpf_link->destroy() isn't used by any code, so remove it. Instead, add ability
to override deallocation procedure, with default doing plain free(link). This
is necessary for cases when we want to "subclass" struct bpf_link to keep
extra information, as is the case in the next patch adding struct
bpf_link_perf.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210815070609.987780-9-andrii@kernel.org
tools/lib/bpf/libbpf.c