Commit Graph

1363 Commits

Author SHA1 Message Date
Hungming Chen
a665eaf548 [BOT.3] Add unit test for polling network stats in the coordinator am: 7997d691fe am: 5fd9fcce13 am: a3c8a7503c
Original change: undetermined

Change-Id: Idc22c3e83df64f52cc6efc0770ded75ad274ab5b
2020-06-02 00:15:10 +00:00
Hungming Chen
585394e243 [BOT.2] Create a coordinator and stats provider to provide tether stats am: 68f1c2a63f am: eba638f4a9 am: 8bebb8eaa5
Original change: undetermined

Change-Id: Iff7cd2af01fbbffa1967c2f91c9961187cd73eaa
2020-06-02 00:15:06 +00:00
Hungming Chen
23a6cb16b6 [BOT.1] Add a class ForwardedStats in TetheringUtils am: d0216998a4 am: e624037dd3 am: e5682257be
Original change: undetermined

Change-Id: I9e867d438cb2a4fbb300d7269040ba7033fb8594
2020-06-02 00:15:02 +00:00
Hungming Chen
a3c8a7503c [BOT.3] Add unit test for polling network stats in the coordinator am: 7997d691fe am: 5fd9fcce13
Original change: undetermined

Change-Id: Ib9ad6e1ab139295ef603e7c8ec86d689ea9801af
2020-06-02 00:13:40 +00:00
Hungming Chen
8bebb8eaa5 [BOT.2] Create a coordinator and stats provider to provide tether stats am: 68f1c2a63f am: eba638f4a9
Original change: undetermined

Change-Id: Ic7fe1a8c0d16c8b435269a1973687655a9c7412b
2020-06-02 00:13:26 +00:00
Hungming Chen
e5682257be [BOT.1] Add a class ForwardedStats in TetheringUtils am: d0216998a4 am: e624037dd3
Original change: undetermined

Change-Id: Ia1847c5b25a429b16ce1d2bae265b299ec31a8a9
2020-06-02 00:13:20 +00:00
Hungming Chen
5fd9fcce13 [BOT.3] Add unit test for polling network stats in the coordinator am: 7997d691fe
Original change: undetermined

Change-Id: Ic3b56365d7f1dbde23e0d1b902a21a3de3ad7327
2020-06-01 23:52:56 +00:00
Hungming Chen
eba638f4a9 [BOT.2] Create a coordinator and stats provider to provide tether stats am: 68f1c2a63f
Original change: undetermined

Change-Id: I21fe5385b8cdfe2ce2ff982884d72a398183bde3
2020-06-01 23:52:53 +00:00
Hungming Chen
e624037dd3 [BOT.1] Add a class ForwardedStats in TetheringUtils am: d0216998a4
Original change: undetermined

Change-Id: Iaba770ec498db0732246549bb276dfcd8f3bc90a
2020-06-01 23:52:45 +00:00
Paul Hu
aed7a0df3f [automerger skipped] Merge "Use Class#getSimpleName instead of KClass#getSimpleName" am: aac3b2ead0 am: ae18ba8e91 -s ours am: 5bc72a4816 -s ours
am skip reason: Change-Id I49bc336a276d30152402eba926cc583bc81e8e5c with SHA-1 6c633de59e is in history

Change-Id: I191829606d832ad1bf676ffbc0670c74d5e23547
2020-06-01 07:28:03 +00:00
Paul Hu
5bc72a4816 [automerger skipped] Merge "Use Class#getSimpleName instead of KClass#getSimpleName" am: aac3b2ead0 am: ae18ba8e91 -s ours
am skip reason: Change-Id I49bc336a276d30152402eba926cc583bc81e8e5c with SHA-1 6c633de59e is in history

Change-Id: I3daa7e0ca0e035c83d1e2f2ac839cebfae33d2fe
2020-06-01 07:16:32 +00:00
Paul Hu
ae18ba8e91 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" am: aac3b2ead0
Change-Id: Ica9acc5b0df4a781a05ae49122978b8ce85b85d3
2020-06-01 06:59:48 +00:00
Paul Hu
aac3b2ead0 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" 2020-06-01 06:43:13 +00:00
Paul Duffin
669e1d848e Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5 am: 4a93d5ea3a
Change-Id: I8ff6bb1b049f96d71612020adccd8c4a6888c178
2020-05-31 14:46:00 +00:00
Paul Duffin
c610401918 Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5 am: 408914d348
Change-Id: Ib58ede3af2e2c12b7c5a4fdfde3f74a595e229b4
2020-05-31 14:45:39 +00:00
Paul Duffin
4a93d5ea3a Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5
Change-Id: I385b2d13d96fd34c8fe031994d56de3763fe3917
2020-05-31 14:25:37 +00:00
Paul Duffin
408914d348 Merge "Clean up the visibility rules for framework modules" into rvc-dev am: 07555b53a5
Change-Id: I43891381685098f03005500e9049972c1a3c1b39
2020-05-31 14:25:06 +00:00
Paul Duffin
a17cf677b5 Clean up the visibility rules for framework modules
Switching from java_library to java_sdk_library switched the meaning
of the module name from referring to the implementation library to
referring to the stubs. This change updates the visibility rules to
reflect that new meaning.

Visibility rules that were previously set for the java_library have
been moved to the impl_library_visibility property and the special
//visibility:override value has been prepended to prevent it from
inheriting the values from the visibility property.

Visibility rules set for the stubs (via stubs_library_visibility)
property have been moved to the visibility property.

Bug: 155164730
Test: m nothing
Exempt-From-Owner-Approval: Build cleanup
Change-Id: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
2020-05-31 13:45:51 +01:00
Automerger Merge Worker
c291f57f0d Merge "[automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 am: 8b5a29a30f -s ours" into rvc-d1-dev-plus-aosp 2020-05-30 15:03:41 +00:00
Mark Chien
0966a74414 [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours am: a6d948cf73 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I7a42ee0b98c9f4b7251b2673609ed89e81722aac
2020-05-30 15:03:34 +00:00
Mark Chien
34656783de [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 am: 8b5a29a30f -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I18f6a7b449cffb0e1d6069a0abae15c76396ba72
2020-05-30 15:03:31 +00:00
Mark Chien
8b5a29a30f Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63
Change-Id: I87c8cc92a78ba7bd17581c23e1603ac47391e96e
2020-05-30 14:47:07 +00:00
Mark Chien
a6d948cf73 [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I99ca97c91bf2f3705b7295d14f5ddb84d29c84c0
2020-05-30 14:46:40 +00:00
Mark Chien
2ecd333f59 Tethering: ensure downstream prefix do not conflict with upstream
- Add New class PrivateAddressCoordinator to coordinate the private
  address conflict problem.
- Downstream prefix would be random in 192.168.0.0/24 ~
  192.168.255.0/24.
- If new upstream prefix is conflict with existing downstream prefix,
  downstream would be kicked out and it would request a new one.
- The last conflict upstream prefixes would be blacklist. Avoid to
select downstream prefix which is conflict with prefixes in blacklist.

Bug: 130879722
Test: -build, flash, boot
      -atest TetheringTests

Merged-In: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5
Change-Id: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5
2020-05-30 03:42:57 +00:00
Mark Chien
df94b648c8 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048 am: 0e1a1f4c68
Change-Id: Ib77ca516f83ac552429573178f63d08ccfce008e
2020-05-29 22:26:13 +00:00
Mark Chien
0e1a1f4c68 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048
Change-Id: Ib70a471603d850069aae029dea7fc09a9b28f4bc
2020-05-29 22:07:37 +00:00
Mark Chien
3cefc6e048 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8
Change-Id: I55ff57be344e17d3ce16cda7291f7f29f26191b1
2020-05-29 21:42:11 +00:00
Hungming Chen
7997d691fe [BOT.3] Add unit test for polling network stats in the coordinator
Verify that the coordinator could fetch tether stats from BPF maps and
report the network stats to the service.

Bug: 150736748
Test: atest BpfCoordinatorTest
Change-Id: Ib1756159a2047c5db7d31359b0f288f840bd1bb1
2020-05-29 20:23:31 +08:00
Hungming Chen
68f1c2a63f [BOT.2] Create a coordinator and stats provider to provide tether stats
Make BPF tethering offload coordinator, BpfCoordinator,
registers a network stats provider, BpfTetherStatsProvider, and
provide the tethering stats from the BPF map.

Bug: 150736748
Test: new test BpfCoordinatorTest

Change-Id: I22e71f87b67668f7e733e4f215d93bf5b2c9380d
2020-05-29 20:23:22 +08:00
Hungming Chen
d0216998a4 [BOT.1] Add a class ForwardedStats in TetheringUtils
Used to record offload transmitted/received forwarded bytes/packets.

Bug: 150736748
Test: new test BpfTetheringCoordinatorTest
Change-Id: Ie8725f95c3ddd5fb3811d479de32d2c1f7dcb493
2020-05-29 20:23:14 +08:00
Chalard Jean
5ba4e8018e Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 601193a68e
Change-Id: If2085438daf43081c67d5174aca07ed7e3055327
2020-05-29 09:51:40 +00:00
Chalard Jean
fe32a82433 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 04fb018acc
Change-Id: Idfe54387a331f532040ea3986eb7948e24ea7304
2020-05-29 09:51:14 +00:00
Chalard Jean
04fb018acc Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd
Change-Id: I085ccc0a27d07489daeb91e13c23ccf58e3f7bc0
2020-05-29 09:25:22 +00:00
Chalard Jean
601193a68e Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd
Change-Id: Ice90dba6408eca9c031592fd4933a107fdbbec2f
2020-05-29 09:24:53 +00:00
Chalard Jean
88c69840cd Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev 2020-05-29 09:16:28 +00:00
Mark Chien
491b0772e1 [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours am: f1d99b078a -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: Id4febbdbf75c4acfaa4a62f8124314608fb494b5
2020-05-29 06:38:55 +00:00
Mark Chien
6e4df2bbea [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b am: 86780d3db9 -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: I8e1a67cf3573d0294e5585cb794ea5265a9486a3
2020-05-29 06:38:49 +00:00
Mark Chien
f1d99b078a [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: If8c7dd5b84efc54b5ba4fcbcbed18c1f18009613
2020-05-29 06:25:12 +00:00
Mark Chien
86780d3db9 Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b
Change-Id: I762c9ac79b181a409e6aa2b362665a9f94a62a6d
2020-05-29 06:25:08 +00:00
Mark Chien
40a9eb779b Merge "Extend timeout for requesting tethered interface" into rvc-dev 2020-05-29 06:11:12 +00:00
Mark Chien
7bf51619d8 Merge "Tethering: ensure downstream prefix do not conflict with upstream" 2020-05-29 03:34:45 +00:00
Paul Duffin
a088f4ddfa Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 0135bd56b3
Change-Id: I3cc810ee63810855d1acfe5cddd156d33ed47567
2020-05-28 21:34:23 +00:00
Paul Duffin
0135bd56b3 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f
Change-Id: I509bba81369d935cb869e313ac7ae9930fbadbf4
2020-05-28 21:23:58 +00:00
paulhu
086f24626c Use Class#getSimpleName instead of KClass#getSimpleName
KClass#getSimpleName need refer to kotlin-reflect.jar which need
include it in Andorid.bp. However, it's not necessary to use
KClass#getSimpleName but use Class#getSimpleName instead.

Test: atest TetheringTests
Bug: 157527499
Change-Id: I49bc336a276d30152402eba926cc583bc81e8e5c
Merged-In: I49bc336a276d30152402eba926cc583bc81e8e5c
2020-05-29 00:29:22 +08:00
Paul Duffin
fdcbc6042a [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours am: 027e07d72d -s ours
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history

Change-Id: I39ea3325d903b1f3170e6304d83dcc3d257ea113
2020-05-28 15:44:25 +00:00
Paul Duffin
027e07d72d [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history

Change-Id: I1f0759e84c6f7e17427165fc6db9dd7531284e8a
2020-05-28 15:29:34 +00:00
Paul Duffin
d65294b376 Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753
Change-Id: I9e5526a23087dd9d9610b4ce5e29e28a7dfdda4f
2020-05-28 15:18:36 +00:00
Paul Duffin
b5bf211753 Merge "Switch framework-tethering to use java_sdk_library" 2020-05-28 15:01:46 +00:00
Paul Duffin
2744465710 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 6216a6904e
Change-Id: Ic732265e75f86e9aa5c523ae1ced9ff2b92e220a
2020-05-28 13:24:45 +00:00
Paul Duffin
2dae272903 Switch framework-tethering to use java_sdk_library
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
    naming_scheme: "frameworks-modules"

That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.

Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.

However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.

In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.

Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
2020-05-28 13:14:52 +00:00