Commit Graph

3 Commits

Author SHA1 Message Date
Maciej Żenczykowski
7e2f53e762 reverse BpfMap & BpfMapRO inheritence to make sense
Bug: 235590615
Bug: 235907076
Bug: 286003437
Test: TreeHugger, m droid gpuservice_unittest libtimeinstate_test bpf_benchmark bpf_module_test libbpf_load_test && mma
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I020a898fe8b257040a100f146654d4a04b19f843
2023-09-29 00:44:33 +00:00
Maciej Żenczykowski
2efccc5a0e BpfMap.h - hide dangerous stuff behind #ifdef BPF_MAP_MAKE_VISIBLE_FOR_TESTING
while we're at it:
  - replace 'unique_fd != -1' with unique_fd.ok() which is
    a test for fd.get() >= 0 and is thus effectively equivalent
  - make use of the fact that unique_fd.reset()
    takes care to save errno.

(see impl. in //system/libbase/include/android-base/unique_fd.h )

Bug: 236285127
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6fb7bf28a2265ad84baa3c552b39c620cb3875fe
2022-06-16 19:25:30 +00:00
Ken Chen
0f1ee4ca81 Rename bpf_map_utils to bpf_headers
Use a generic name so that it can contain more bpf related headers.

Bug: 202086915
Test: build
Change-Id: I5a76948db394d8d7bb6eaedb570a2ca5bc99a289
2021-12-21 16:16:20 +08:00