No description. Add one?
  • Java 78%
  • Kotlin 11.8%
  • AIDL 4.4%
  • C++ 3.7%
  • C 1.5%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej Żenczykowski 9017a07049 switch netd_configuration_map from hash map to array
This eliminates the need for netd_updatable BpfHandler.cpp
to initialize the hash map with a zero.

On startup the map will be freshly initialized and thus zero.

On restart it might not be empty, but it doesn't matter to netd.
Furthermore the mainline component of the system server will
re-initialize it again anyway:
see service/native/TrafficController.cpp initMaps()

This does remove the ability to call deleteValue on a key,
since that would always return -EINVAL, but since we don't
currently do that, that's really a feature.

(It does suggest though that we should have a BpfMapNonNullable
 class which is writeable, but without a deleteValue() function)

Additionally BpfMap arrays are more efficient for the kernel bpf jit
compiler, as - on newer kernels - it can optimize the read/write
into a simple memory access (as opposed to a bpf helper call).

Before:
  $ adb shell ls -l /sys/fs/bpf/netd_shared/map_netd_configuration_map
  -rw-rw---- 1 root net_bw_acct 0 2022-06-11 08:20 /sys/fs/bpf/netd_shared/ map_netd_configuration_map

After:
  $ adbz shell ls -l /sys/fs/bpf/netd_shared/map_netd_configuration_map
  -r--rw---- 1 root net_bw_acct 0 2022-06-16 15:03 /sys/fs/bpf/netd_shared/map_netd_configuration_map

Bug: 218408035
Bug: 235590615
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I21730e4fa22fbf0c94ab0ca5c5db03aa000b7680
(cherry picked from commit b10e055f4b)
Merged-In: I21730e4fa22fbf0c94ab0ca5c5db03aa000b7680
2022-06-21 03:19:36 +00:00
bpf_progs switch netd_configuration_map from hash map to array 2022-06-21 03:19:36 +00:00
framework Add 3rd deny firewall chain for OEM 2022-06-07 05:35:36 +00:00
framework-t Ensure callbacks are run properly on executor 2022-06-03 09:07:40 +00:00
nearby Disable NearbyMultiDevicesTestSuite in CTS. 2022-06-08 17:45:07 +00:00
netd switch netd_configuration_map from hash map to array 2022-06-21 03:19:36 +00:00
service switch netd_configuration_map from hash map to array 2022-06-21 03:19:36 +00:00
service-t Send callback if ip provisioning is interrupted 2022-06-17 23:30:52 +00:00
tests Send callback if ip provisioning is interrupted 2022-06-17 23:30:52 +00:00
Tethering Fix jarjar rules for tethering apk 2022-06-02 04:08:57 +00:00
.gitignore Add a .gitignore in packages/modules/Connectivity. 2020-11-27 18:09:21 +09:00
OWNERS Add additional IPsec owners 2021-12-08 06:57:51 +00:00
OWNERS_core_networking add prohr to OWNERS_core_networking 2022-01-11 18:54:31 +00:00
OWNERS_core_networking_xts Add an OWNERS_core_networking_xts for CTS/GTS/... and use it. 2022-01-18 01:42:39 +00:00
PREUPLOAD.cfg Enable tethering to perform its own hidden API processing 2021-06-28 23:41:38 +01:00
TEST_MAPPING Create CtsNetTestCasesMaxTargetSdk31. 2022-06-01 06:05:02 +00:00