(this renames the file in the apex, but should otherwise not matter)
Test: TreeHugger, manually on cf (thread daemon still starts)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6087f95b0f3a4ba10b922ca78d2210377d5075ea
Maciej Żenczykowskicommited 2024-08-30 18:43:42 +00:00
It has been a long standing bug that eventually the dscp
policy socket cache fills up and stops working for new
sockets.
The intent was this would be periodically cleared on some
sort of LRU basis from userspace.
But why bother?
We convert from hash[cookie:u64] to array[cookie % X].
If the cache misses, we simply recalculate and replace it.
This also allows us to reduce the size of the map:
we go from 1024 entries to 32 entries per cpu (likely ~8) so 256.
We're unlikely to have many active flows on any given cpu
at any given time - and the chance of collision is reasonable,
so thrashing should be minimal.
Longer term it would probably be even better to use
socket local storage for this purpose...
(Note: we don't have generation ids on the policy,
so we still don't apply new policy / policy changes
to old sockets... oh, well...)
Test: TreeHugger, atest CtsNetTestCases:android.net.cts.DscpPolicyTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia570aec44e399d326c165b271ae4dad01f8aa100
Maciej Żenczykowskicommited 2024-08-30 01:13:53 +00:00
Another step towards moving all bpf related stuff into a common directory.
In practice netd_updatable is only actually used for bpf...
The upcoming netbpfload UML test should be checking netd_updatable's
initialization succeeds (useful since that opens a bunch of maps
fetches some programs, and attaches them to a bunch of cgroup hooks).
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I65a0fbbf18bf0aa87938df691c0a9ebcca9a084c
Maciej Żenczykowskicommited 2024-08-29 22:25:51 +00:00
(ALOGD can get entirely stripped out of the logs)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I513d10acb9f1cc330b9cd5a4245f3af7e790a4d6
Maciej Żenczykowskicommited 2024-08-29 21:18:22 +00:00
(pulled from my notes / in-progress work on non-Android clat implementation)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iae662f542be371c4110205c8c3bef0a416b47566
Maciej Żenczykowskicommited 2024-08-29 21:18:17 +00:00
BPF_PROG_LOAD can fail with various permission related
errors, and then it doesn't provide any extra debug details.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9f6f0bf30158828fe31045a11a1f4c015feeb61e
Maciej Żenczykowskicommited 2024-08-29 21:18:00 +00:00
We're reduced logging enough that it is no longer clear
which program failed to load.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8919a055f82d0c0e6e6818799463c606e853f70b
Maciej Żenczykowskicommited 2024-08-29 21:17:12 +00:00
This is entirely expected due to lack of implementation in <4.14.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifebe6843dc77b1b9a506c61239dcebe7262d0869
Maciej Żenczykowskicommited 2024-08-29 12:19:56 -07:00
Longer term we should fix the bpf_map_def.h to
actually set map_flags correctly.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4e7954ccd0afad4ca8d9cec179ad6efa20592609
Maciej Żenczykowskicommited 2024-08-29 18:10:28 +00:00
This is needed for follow-up CLs to wrap necessary code
change under this flag.
Test: TH
Bug: 354619988
Change-Id: I7a36ff228b1ff34860c7fa4e90537ad87f543ddc
This CL works with the corresponding ot-br-posix CL to separate the
config and the infra link state. In this way,
ThreadNetworkControllerService will call different APIs to send the
config/state to ot-daemon.
Bug: 362172947
Change-Id: Iae98325358f81ea2ff0c672577cc21a128ae049a
The newly added Thread flags (i.e. configuration_enabled and
channel_max_power_enabled) are not visible on gantry. This is due to the
flags are not fixed.
Bug: 346686506
Change-Id: I4c50507c90057132aa336a401a53e9c560acd8bc
This allows changing the location of bpf programs easily
when building for the host to run on UML as a test.
Bug: 205608149
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I24816b6660581e74f277df39495a43027b77d2cf
Maciej Żenczykowskicommited 2024-08-26 17:29:52 -07:00
Some compilers warn/error and fail to build if it is not in proper order.
(specifically: triggers during build for host)
Bug: 205608149
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I84ddec9a2443939616fd78f522e8620680e1289e
Maciej Żenczykowskicommited 2024-08-26 17:29:47 -07:00
(particularly problematic on host builds where host headers are ancient...)
Bug: 205608149
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iae64b900464e7584ad657f18d8101993fd8c8e33
Maciej Żenczykowskicommited 2024-08-26 17:29:41 -07:00
Another step towards moving all bpf related stuff into a common directory,
which will ease development.
I want to refactor this test so that it can also be run as a self-test
in UML (for testing bpfloading functionality across a large variety of
Linux kernel (both major and minor LTS) and Android (API/SDK level)
platform versions.
Bug: 205608149
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idc9104783b2fa60626e9c1fd463c4d94fd4a908c
Maciej Żenczykowskicommited 2024-08-26 16:19:48 -07:00
This is a no-op name refactoring CL to prepare for supporting Thread
in mobile use cases where Thread won't operate as a Border Router.
Flag: EXEMPT AIDL interface change (plus it just changes names)
Change-Id: Ib27bcb5b9cd5e9d04db720fde356be15e90068fa
This CL changes the hiden API `setChannelMaxPowers` to system API
to allow the privilege app to set the max power of each Thread channel.
Bug: b/346686506
Test: atest CtsThreadNetworkTestCases
Change-Id: I1089a4a315971c3bca8ec688a02143ddec93d039
doReturn is less prone to races since when().thenReturn will fail if the
mock is used by other thread between when() and thenReturn()).
Bug: 337473824
Test: LocationPermissionCheckerTest
Change-Id: Ie07f3f3cf23b57296a7db4fb9296b84be5b57214
This removes the need of pip install absl-py and
virtual env usage from the tests.
Test: atest NetworkStaticLibHostPythonTests
Bug: N/A
Change-Id: I2259f7702ecc6b5e7b7b23e2bf44fa28a5a2e07b
This is needed to cleanly flag on/off DDR and to ensure that
when it is flagged on, DnsResolver ignores the hardcoded list of
DoH providers and only uses DDR.
Bug: 240259333
Test: updated existing tests
Change-Id: I84c103a5a4d18294b6a4cc3301d0037d1a6673a4
Lorenzo Colitticommited 2024-08-23 18:23:42 +09:00
Mainline trunk stable flag must specify is_fixed_read_only: true since
server-side flags not supported for mainline in the trunk stable infrastructure
as of now.
Change-Id: Ibb2d599ee655f871f08b36bbc3cd6e286cf0d3c8
Test: TH
Fix mistakes pointed out in
aosp/3195840 and aosp/3115462:
1. typo of bug id in comments
2. removal of unused funtion
3. removal of redundant blank lines
Test: TH
Bug: 343844995
Change-Id: I932e766c76e9a194d6718f3929bd50215d0b55cb
Junyu Laiauthored and Yun-Chen Chengcommited 2024-08-23 06:00:19 +00:00