refactor bpf maps into class
Use a class object to wrap up the bpf map file descriptor and provide some base function to look up, write and delete the map content. The map class also have a nested iterator class to iterate over the map and two helper function to simplify the iterating process. Removed the mDeleteStatsMutex since it cannot prevent framework side to read the stats while we are deleting the stats and all the other netd operation on the stats related map doesn't need to iterate through the map anyway. Bug: 78250686 Test: netd_unit_test libbpf_test Change-Id: I358ba65f7022fd03f8ca573550055734052b6fd2 Merged-In: I358ba65f7022fd03f8ca573550055734052b6fd2 (cherry picked from aosp commit 4f6c2377)
Loading
Please register or sign in to comment