Commit graph

71,738 commits

Message SHA1
cronet: Add dependency needed to make use of SdkLevel
Test: m with this CL + aosp/2369503

Change-Id: I867ad377fb98a1645a461dafba79266f0cd58cc3

Stefano Duo   commited 2023-01-10 09:58:46 +00:00
0978c0716e
Merge changes I25096f4c,I40ba22ab
* changes:
  cronet: enable defaults in aosp
  cronet: add defaults to enable / disable Cronet in framework-tethering

Patrick Rohr   authored and   Gerrit Code Review   commited 2023-01-09 09:29:06 +00:00
9e31b74ee5
Merge "fix argument to CloseGuard.open()"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-07 09:54:58 +00:00
33b2163412
Merge "unregistered null callback will cause a crash later"
Steven Moreland   authored and   Gerrit Code Review   commited 2023-01-07 02:11:16 +00:00
f4e0f096b5
fix argument to CloseGuard.open()
Based on documentation, String parameter to CloseGuard.open() should be the name of the method to close the resource (in this case Resource.close()).

As currently written, the debug output from warnIfOpen() will be "Resource failed to call constructor."

Bug: 131838407
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9b8a71f9076712014bb883bbde5e5fbdb018b2d5

Maciej Żenczykowski   commited 2023-01-07 01:00:18 +00:00
223b5cc371
Merge "Apply "most-recent" delivery policy to NETWORK_STATS_UPDATED."
Sudheer Shanka   authored and   Gerrit Code Review   commited 2023-01-07 00:10:51 +00:00
4f46dd8d78
Merge "Update bpf helpers to support new ignore_on fields"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-06 20:44:24 +00:00
1f9c939241
cronet: enable defaults in aosp
Automerger into tm-mainline-prod is currently broken, so this change
uses a Merged-In line that is already present in tm-mainline-prod (and
downstream from it). This means that this change must also be
cherry-picked into internal-master with a slightly different Merged-In
specification.

Test: TH
Merged-In: I555ad1ed687632cfe8a7e30283f80e80956fc1d4
Change-Id: I25096f4cc21923c602d77a66aad248d52b42b18f

Patrick Rohr   commited 2023-01-06 04:13:56 -08:00
a6d600ff50
cronet: add defaults to enable / disable Cronet in framework-tethering
A similar option already exists in
packages/modules/Connectivity/Cronet/apex/Android.bp. This is in
preparation of adding cronet to framework-tethering. It is possible that
we only end up using one of the variables but better safe than sorry.

This change will be blocked by the blocked automerger into
tm-mainline-prod. If this continues to be a problem, we might have to
play some tricks with automerger.

Test: TH
Change-Id: I40ba22aba041ec12ec2bf2881df14e6c0ee53b44

Patrick Rohr   commited 2023-01-06 04:12:59 -08:00
3b9ba6acdf
Merge changes Ic85de603,I57311234,I28fd8637
* changes:
  gn2bp: Use startswith instead of regex
  gn2bp: Remove unused condition for src path filtering
  gn2bp: Use "out" prefix for src path filtering

Patrick Rohr   authored and   Gerrit Code Review   commited 2023-01-06 11:51:16 +00:00
9a90448aee
Merge "Rename isStrictMode to better names"
Jean Chalard   authored and   Gerrit Code Review   commited 2023-01-06 06:14:26 +00:00
a8e13ec811
Apply "most-recent" delivery policy to NETWORK_STATS_UPDATED.
This allows us to skip any older NETWORK_STATS_UPDATED broadcasts
waiting to be delivered when a new broadcast is dispatched.

Bug: 255525222
Test: TH
Change-Id: I5797fb5f1e190a5445935502500e4274c2dc0be2

Sudheer Shanka   commited 2023-01-06 04:50:51 +00:00
136e603739
gn2bp: Use startswith instead of regex
Test: ./update_results.sh
Change-Id: Ic85de603d6edb3565552731bac60a57961c8aecc

Motomu Utsumi   commited 2023-01-06 11:53:27 +09:00
7841c80557
gn2bp: Remove unused condition for src path filtering
Test: ./update_results.sh
Change-Id: I5731123496490759e5ec3e8f53dd19d8fe6554b4

Motomu Utsumi   commited 2023-01-06 11:53:14 +09:00
4424f34582
gn2bp: Use "out" prefix for src path filtering
instead of "out/test".

Test: ./update_results.sh
Change-Id: I28fd863742f2531bb942a15c636ca311ef45c307

Motomu Utsumi   commited 2023-01-06 11:52:18 +09:00
e5ea57bc4f
unregistered null callback will cause a crash later
Bug: N/A
Change-Id: I7acbc084d8a401817879d416f0283ca40e060069
Test: N/A

Steven Moreland   commited 2023-01-06 02:29:54 +00:00
cf42d60c53
Update bpf helpers to support new ignore_on fields
This change updates callers to include the new ignore_on and bpfloader
arguments as per the change in aosp/2374598.

Bug: 246985031
Test: tethering build & install, full platform build & install
Change-Id: Id940a6003ae4cb0bbfc65db8ff96590c4f3c847b

Ryan Zuklie   commited 2023-01-05 13:26:30 -08:00
cc72fa8f9d
Merge "cronet: add script to generate desc_*.json"
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-01-05 15:47:33 +00:00
e54ec746d7
cronet: add script to generate desc_*.json
It's very basic for now.

Test: run the script
Change-Id: Ie848f8da6936f4300ba5ecdc041523440be25e8a

Patrick Rohr   commited 2023-01-05 07:45:43 -08:00
6d722af6f3
Merge "gn2bp: remove unnecessary chrome_root_store target"
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-01-04 13:20:04 +00:00
95f73110df
Merge "clatd - ipv6 fragment to ipv4 translation support (try 2)"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-04 13:17:21 +00:00
353dce7e87
clatd - ipv6 fragment to ipv4 translation support (try 2)
This is a repeat of:
  https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2266447

which was reverted in:
  https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2372509

This time with kver >= 4.14 protections of the bpf_skb_adjust_room()
bpf helper which isn't present on 4.9 T devices.

Original change comments:

Tested manually on a flame device connected to an ipv6-only wifi
network (GoogleGuest).

On server:
  nc -4 -l -u -p 443

On client (phone):
  adb shell nc -4 -u my.server 443

On client (phone):
  adb shell tcpdump -l -ee -vv -s 1600 -i v4-wlan0

On client send something to server "Hi."
On server send something to client "Hey!"

You should see normal unfragmented IP packets.

Then on server send something really long (I used 57 copies of the 26 letter English alphabet).  This should be long enough that fragmentation is required.

You should see tcpdump show 2 ipv4 fragments, and netcat
show the packet being delivered correctly.

(and previous versions of the code were buggy and were
resulting in corrupt packets and things not working)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6758e63d8133215edd26b4cd2d73a5b5f261ffd1

Maciej Żenczykowski   commited 2023-01-04 11:35:50 +00:00
9b239528e3
Merge "BpfCoordinator: publish upstream interface mtu to v4 offload rule"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-04 09:38:37 +00:00
74828818df
[Cronet] Do not run cronet cts on instant apps
Instant apps cannot create sockets and the CTSTestServer used
in all of cronet cts need to create sockets

Test: m cts && cts-tradefed run cts -m CtsCronetTestCases
Bug: 263472960
Change-Id: I4b929c2c339e23f01351d96930c5185b0b25d964

Chidera Olibie   commited 2023-01-03 22:22:45 +00:00
2e169db5a5
BpfCoordinator: publish upstream interface mtu to v4 offload rule
Respect the upstream interface mtu instead of always setting
mtu 1500.

Using upstream interface mtu is probably not the best solution
for tether offload pmtu but it at least respects the upstream
interface mtu which may be less than 1500.

Test: manual test
1. Connect to carrier Taiwan Star.
2. Enable tethering and check the mtu 1434 in dumpsys.
IPv4 Upstream: proto [inDstMac] iif(iface) src -> nat ->
dst [outDstMac] pmtu age
  udp [02:10:45:32:ef:35] 54(54) 192.168.72.125:39034
  -> 15(rmnet1) 100.83.189.11:39034
  -> 142.251.43.14:443 [00:00:00:00:00:00] 1434 69657ms
IPv4 Downstream: proto [inDstMac] iif(iface) src -> nat
  -> dst [outDstMac] pmtu age
  udp [00:00:00:00:00:00] 15(rmnet1) 142.251.43.14:443
  -> 54(54) 100.83.189.11:39034
  -> 192.168.72.125:39034 [9a:8a:4d:ec:a4:7c] 1434 69633ms

Bug: 262860312
Test: atest BpfCoordinatorTest
Change-Id: Ic6dcb95ed76d5306053e4645b6baebc67ff082cf

Hungming Chen   commited 2023-01-03 23:36:30 +08:00
5c985e2cdd
Merge "Revert "clatd - ipv6 fragment to ipv4 translation support""
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-01-03 14:58:17 +00:00
a6d6184760
gn2bp: remove unnecessary chrome_root_store target
Test: cd external/cronet && mm
Change-Id: Idec19f1364c9dca4d278a33eebf500a4db87f389

Patrick Rohr   commited 2023-01-03 05:27:57 -08:00
7184dce577
Merge "check for U+ before checking device feature flags"
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-01-03 12:37:42 +00:00
b70f914b94
Merge "gn2bp: Remove empty srcs cc_object from blueprint"
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-01-03 12:12:29 +00:00
b85f572174
Revert "clatd - ipv6 fragment to ipv4 translation support"
This reverts commit be9685c35c.

Reason for revert:
  fails on 4.9 due to bpf_skb_adjust_room requiring a later kernel,
  will need an alternative approach

Bug: 261818177
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I26535a96de80febc2fd54dcb564cde4f9ed7b3c9

Maciej Żenczykowski   commited 2023-01-03 11:30:54 +00:00
2aaa7b6c67
Merge "Remove mSubscriberIdMatchRule from NetworkTemplate"
Aaron Huang   authored and   Gerrit Code Review   commited 2023-01-03 02:14:12 +00:00
b97fbbf5e0
Merge "netd.c - switch from is_4_19 to simply passing KVER(4, 19, 0) around"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-12-30 20:52:56 +00:00
77c844af14
Merge "BpfCoordinatorTest: renumber the test interface indices"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-12-30 20:46:16 +00:00
53e8697d39
netd.c - switch from is_4_19 to simply passing KVER(4, 19, 0) around
will make it easier to extend this for 5.4+ behaviour as well
without having to introduce another is_5_4 boolean

Bug: 263884894
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id4f6512d813dd460cb2b9a7ccb6a5f7b7e937575

Maciej Żenczykowski   commited 2022-12-30 18:59:49 +00:00
0966bbee1a
netd.c - simplify, if not map A then by definition map B
easier on bpf verifier with no third case

Bug: 263884894
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5076de6f83ba522ed4783bca0a9d7fca4024986a

Maciej Żenczykowski   commited 2022-12-29 12:06:49 +00:00
28b9a29e04
gn2bp: Remove empty srcs cc_object from blueprint
* This was failing the pre-submits are cc_objects are compilable modules but they failed to compile due to empty srcs. However, this didn't affect the compilation of Cronet as the empty cc_objects are never in the path of compilation of Cronet because their attributes are propagated up the tree.

Test: m
Change-Id: I7cc87d53d4f460ef4958d5ecfb23ac28662fdbdc

Mohannad Farrag   commited 2022-12-29 11:49:04 +00:00
b6dbca96b6
BpfCoordinatorTest: renumber the test interface indices
This is a preparation to add new interface index.

Test: atest BpfCoordinatorTest
Change-Id: I758c2e7142099d74099fb8203f41ffec9b1182ee

Hungming Chen   commited 2022-12-28 21:47:11 +08:00
46767ff62e
Remove mSubscriberIdMatchRule from NetworkTemplate
Currently, mSubscriberIdMatchRule is only used in NetworkTemplate
and it depends on if mMatchSubscriberIds is empty or not. Thus,
remove it since is not really necessary and replace it with
checking matchSubscriberIds if needed.

Bug: 238843364
Test: build, FrameworksNetTests
      CtsNetTestCases
Change-Id: Ic66d2ff2826846778b004bb15a4718a62fa1f470

Aaron Huang   commited 2022-12-28 12:09:09 +08:00
4854d055bb
check for U+ before checking device feature flags
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I12e147e61febd96324cdbb6642e0894e5c399526

Maciej Żenczykowski   commited 2022-12-27 10:57:59 +00:00
e7ebb15424
gn2bp: Use libmediandk to include <media/NdkMediaError.h>
media_ndk_headers is not available to tethering apex.
But header files are available via libmediandk ndk_library

Test: m
Change-Id: I319d9f3a68c64d7b73af68db40d4a509eba59cd3

Motomu Utsumi   commited 2022-12-24 01:15:08 +09:00
dbf2863471
gn2bp: Add cronet_aml_api_java to cronet_aml_java lib
Test: ./update_results.sh
Change-Id: I02fb762d2a4af0fe5b200a9aafc6dee33d3eaed0

Motomu Utsumi   commited 2022-12-24 01:15:02 +09:00
46ec15cdeb
gn2bp: Add filegroup for cronet api
Test: ./update_results.sh
Change-Id: I4f02494448ede2eeefadbbb9c7c4fdf38ede645c

Motomu Utsumi   commited 2022-12-24 01:14:53 +09:00
a0a3dbea5f
gn2bp: Remove api sources from cronet_aml_java
Test: ./update_results.sh
Change-Id: I2d1df64fe312806fc834d58847ba7f041e202fc3

Motomu Utsumi   commited 2022-12-24 01:14:47 +09:00
1002cd851b
gn2bp: Added java group name to java_sources/actions
Test: ./update_results.sh
Change-Id: Ibc2b3152ab68c5b46acff7d19d2c853889fa887c

Motomu Utsumi   commited 2022-12-24 01:14:40 +09:00
ea729d3204
gn2bp: Update is_java_target to java_group_name
This helps to know java_sources/java_actions are in which java group

Test: ./update_results.sh
Change-Id: Iec3fad1aded935a8d17184a2315d7f21b2a803f2

Motomu Utsumi   commited 2022-12-24 01:14:33 +09:00
940cc564a1
Merge changes I1470e1fa,I52250144,I03b12ae6,Id08cb64c
* changes:
  gn2bp: remove hardcoded jni_registration denylist
  gn2bp: add javacflag to skip GEN_JNI stub generation
  gn2bp: use Android libgtest_prod_headers
  gn2bp: depend on :current_android_jar for JNI generation

Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-12-23 04:29:47 +00:00
cd9399be1e
gn2bp: remove hardcoded jni_registration denylist
Test: m cronet_aml_java
Change-Id: I1470e1faa64f17729c63082228423f8177798d88

Patrick Rohr   commited 2022-12-22 19:35:06 -08:00
f20b5ed35b
gn2bp: add javacflag to skip GEN_JNI stub generation
This conflicts as the fully-featured GEN_JNI is already generated by
another genrule.

Test: none
Change-Id: I522501444b02d2a304e81d86d86b0c8f3589035c

Patrick Rohr   commited 2022-12-22 19:35:06 -08:00
8d393193c1
gn2bp: use Android libgtest_prod_headers
This requires aosp/2366787 to work.
Unfortunately, Chromium does not add a dependency on gtest, so
builtin_module cannot be used.
Using the gtest prod headers from Android is fine for //base. The only
thing that's used is gtest_prod.h, which includes one friend macro that
hasn't changed in 14 years.

Test: build cronet
Change-Id: I03b12ae698699527da7e69c9d4d50da1822fd5bc

Patrick Rohr   commited 2022-12-22 19:35:06 -08:00
baaf160382
Merge "switch DscpPolicyTracker from U32 to S32"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-12-22 21:19:26 +00:00
ed23eb61c1