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 52ff2b64cd dscpPolicy: prevent cache overflow
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
2024-08-30 01:13:53 +00:00
bpf dscpPolicy: prevent cache overflow 2024-08-30 01:13:53 +00:00
clatd [DON'T BLOCK] Test ownership migration rules 2024-01-31 12:34:50 +00:00
common [Thread] make Thread flags fixed_read_only 2024-08-28 13:55:15 +08:00
Cronet Move Cronet's MTS/CTS to external/cronet 2024-05-02 11:54:56 +00:00
DnsResolver Add firewall chains for HAPPY_BOX and user/admin PENALTY_BOX 2024-04-23 15:04:28 +09:00
framework Use java_aconfig_library for android_core_networking flags 2024-08-16 16:57:29 +09:00
framework-t changes the API setChannelMaxPowers from hide API to system API 2024-08-26 10:07:36 +08:00
nearby Use java_aconfig_library for nearby and thread flags 2024-08-16 16:59:08 +09:00
netd CGROUPV2_CONTROLLER_NAME -> CGROUPV2_HIERARCHY_NAME 2024-08-09 16:20:59 +00:00
networksecurity Install CT log list on successful download 2024-08-22 09:27:55 +00:00
remoteauth Switch to libjni_legacy 2024-05-15 23:47:49 +00:00
service dscpPolicy: switch to bool 2024-08-26 16:44:17 -07:00
service-t NetworkTracePoller: fix a warning by explicitly capturing 'this' 2024-08-28 10:41:07 -07:00
staticlibs Merge "Use doReturn instead of when().thenReturn" into main 2024-08-27 06:28:01 +00:00
tests bpf: git mv tests/mts bpf/tests/mts 2024-08-26 16:19:48 -07:00
Tethering Merge "Add SoftApConfiguration to TetheringRequest" into main 2024-08-21 07:28:56 +00:00
thread [Thread] split the configuration and the infra link state 2024-08-28 09:28:46 +00:00
tools Update aospify_device for T device 2024-05-22 13:10:19 +09:00
.gitignore Ignores vim temporary files from git 2023-12-23 17:45:32 +08:00
OWNERS Move the owner of xfrm netlink source code to its own directory. 2023-11-22 18:50:00 +09:00
OWNERS_core_networking Update OWNERS to reflect reorg. 2024-04-10 23:24:14 +00:00
OWNERS_core_networking_xts Add "no-op refactors" reviews for delegated reviewers 2024-06-20 06:29:09 +00:00
PREUPLOAD.cfg Enable builtin formatting hooks 2024-07-17 11:51:08 +09:00
TEST_MAPPING Merge "Remove CtsNetTestCasesLatestSdk" into main 2024-07-05 06:15:04 +00:00