diff options
| author | Andrii Nakryiko <[email protected]> | 2020-04-28 17:16:07 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-04-28 17:27:08 -0700 |
| commit | 2d602c8cf40d65d4a7ac34fe18648d8778e6e594 (patch) | |
| tree | 6c34aec45b8df74c35b19e7b7516c788f4dd29fa /tools/perf/scripts/python | |
| parent | a3b80e1078943dc12553166fb08e258463dec013 (diff) | |
bpf: Support GET_FD_BY_ID and GET_NEXT_ID for bpf_link
Add support to look up bpf_link by ID and iterate over all existing bpf_links
in the system. GET_FD_BY_ID code handles not-yet-ready bpf_link by checking
that its ID hasn't been set to non-zero value yet. Setting bpf_link's ID is
done as the very last step in finalizing bpf_link, together with installing
FD. This approach allows users of bpf_link in kernel code to not worry about
races between user-space and kernel code that hasn't finished attaching and
initializing bpf_link.
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