OSDN Git Service

Merge branch 'introduce BPF_F_PRESERVE_ELEMS'
authorAlexei Starovoitov <ast@kernel.org>
Thu, 1 Oct 2020 06:18:12 +0000 (23:18 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 1 Oct 2020 06:21:17 +0000 (23:21 -0700)
commit6208689fb3e623d3576dd61866cb99b40f75dc53
tree5ced6a6080311879a0f2d103db5bc6e761e0f406
parent3effc06a4dde3e2f6ee3d82e59d97ec357802a4b
parentd6b42068412bd17d94b3b7b51d3787120ba8c738
Merge branch 'introduce BPF_F_PRESERVE_ELEMS'

Song Liu says:

====================
This set introduces BPF_F_PRESERVE_ELEMS to perf event array for better
sharing of perf event. By default, perf event array removes the perf event
when the map fd used to add the event is closed. With BPF_F_PRESERVE_ELEMS
set, however, the perf event will stay in the array until it is removed, or
the map is closed.
---
Changes v3 => v5:
1. Clean up in selftest. (Alexei)

Changes v2 => v3:
1. Move perf_event_fd_array_map_free() to avoid unnecessary forward
   declaration. (Daniel)

Changes v1 => v2:
1. Rename the flag as BPF_F_PRESERVE_ELEMS. (Alexei, Daniel)
2. Simplify the code and selftest. (Daniel, Alexei)
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>