diff options
| author | Andrii Nakryiko <[email protected]> | 2020-04-28 17:16:06 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-04-28 17:27:08 -0700 |
| commit | a3b80e1078943dc12553166fb08e258463dec013 (patch) | |
| tree | e022212949f8028eacf0c5d3ad77218d7f1a7b1a /tools/perf/scripts/python | |
| parent | f9d041271cf44ca02eed0cc82e1a6d8c814c53ed (diff) | |
bpf: Allocate ID for bpf_link
Generate ID for each bpf_link using IDR, similarly to bpf_map and bpf_prog.
bpf_link creation, initialization, attachment, and exposing to user-space
through FD and ID is a complicated multi-step process, abstract it away
through bpf_link_primer and bpf_link_prime(), bpf_link_settle(), and
bpf_link_cleanup() internal API. They guarantee that until bpf_link is
properly attached, user-space won't be able to access partially-initialized
bpf_link either from FD or ID. All this allows to simplify bpf_link attachment
and error handling code.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions