mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 00:39:07 +08:00
libbpf: Add bpf_link detach APIs
Add low-level bpf_link_detach() API. Also add higher-level bpf_link__detach() one. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20200731182830.286260-3-andriin@fb.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
80a52e3252
commit
2d97d4097f
@@ -117,6 +117,7 @@ enum bpf_cmd {
|
||||
BPF_LINK_GET_NEXT_ID,
|
||||
BPF_ENABLE_STATS,
|
||||
BPF_ITER_CREATE,
|
||||
BPF_LINK_DETACH,
|
||||
};
|
||||
|
||||
enum bpf_map_type {
|
||||
@@ -634,6 +635,10 @@ union bpf_attr {
|
||||
__u32 old_prog_fd;
|
||||
} link_update;
|
||||
|
||||
struct {
|
||||
__u32 link_fd;
|
||||
} link_detach;
|
||||
|
||||
struct { /* struct used by BPF_ENABLE_STATS command */
|
||||
__u32 type;
|
||||
} enable_stats;
|
||||
|
||||
Reference in New Issue
Block a user