Commit Graph

1644 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
d3030bf5b4 Merge "Add SocketUtils for NetworkStack" am: d9cc11e8bd
am: 4d301b8d85

Change-Id: I89fe62b4baf63104359bb6741807bb2f1666cdd9
2019-01-28 22:57:39 -08:00
Nick Kralevich
4cc7177dfc Merge "jni: more O_CLOEXECs" am: 0bd511611e am: 7b51a98e96
am: 9a2787c2e7

Change-Id: I34f53d427efb89f295a2027ceffcb5ccbd149e0b
2019-01-28 22:33:27 -08:00
Nick Kralevich
9a2787c2e7 Merge "jni: more O_CLOEXECs" am: 0bd511611e
am: 7b51a98e96

Change-Id: I358eab4877418f2c9a09a8b8d8c4c978de0656d7
2019-01-28 21:46:54 -08:00
Remi NGUYEN VAN
4d301b8d85 Merge "Add SocketUtils for NetworkStack"
am: d9cc11e8bd

Change-Id: I0db40afbf2de55d77d9d5493e556f499d2383f59
2019-01-28 21:19:36 -08:00
Nick Kralevich
7b51a98e96 Merge "jni: more O_CLOEXECs"
am: 0bd511611e

Change-Id: Id9eabfa92a488dbf7a27108aff8101d602e1adc9
2019-01-28 20:31:59 -08:00
Remi NGUYEN VAN
d9cc11e8bd Merge "Add SocketUtils for NetworkStack" 2019-01-28 23:14:08 +00:00
Nick Kralevich
cac3986f14 jni: more O_CLOEXECs
Prevent FDs from leaking across an execve() boundary.

Test: compiles and boots
Change-Id: I5f91046917b55b6abead0a5c6e939f82814e6f18
2019-01-28 10:39:10 -08:00
Remi NGUYEN VAN
894533059e Add SocketUtils for NetworkStack
These utilities can only be used for privileged apps. The underlying
implementation cannot be @SystemApi.

Test: m
Bug: 112869080
Change-Id: Idfa90561102e5b03ab2b79486d3ad46457128bf8
2019-01-28 20:11:27 +09:00
junyulai
1677ea7de5 Hide Keepalive offload API in IpSec
Since the new keepalive API is exported in ConnectivityManager,
hide Keepalive API in IpSec, also make system-current.txt sync
for this part.

Bug: 114151147
Test: m -j
Change-Id: I076030bdbab1cd7d69f6a034577d529970b050dc
2019-01-25 14:41:19 +08:00
Chenbo Feng
ac4d7d1258 Merge "Use delta reads for per uid traffic stats" am: 39de2905a5 am: 03074c729f
am: cf8d605cfb

Change-Id: Ia2d3aad715dc1a2ff65ea9ec1a5badeda47c47a6
2019-01-24 11:57:26 -08:00
Chenbo Feng
cf8d605cfb Merge "Use delta reads for per uid traffic stats" am: 39de2905a5
am: 03074c729f

Change-Id: Ibc1e7d1b6be2915d4000cda2b7a9141ac387f7f0
2019-01-24 11:12:54 -08:00
Chenbo Feng
03074c729f Merge "Use delta reads for per uid traffic stats"
am: 39de2905a5

Change-Id: I17faec2cc2a73e56d0f19abad32154b378857fc4
2019-01-24 10:55:09 -08:00
Chenbo Feng
39de2905a5 Merge "Use delta reads for per uid traffic stats" 2019-01-24 18:16:25 +00:00
Remi NGUYEN VAN
69281a355b Merge changes I1250730c,I7d00848c am: e693d49c0a am: fef17fd05f
am: ff1f9b78d4

Change-Id: Icc938491a9c4474cc27a4376ef03c954aac461b3
2019-01-23 09:01:09 -08:00
Remi NGUYEN VAN
ff1f9b78d4 Merge changes I1250730c,I7d00848c am: e693d49c0a
am: fef17fd05f

Change-Id: I31c9f6c11d0f52a34f68151fc2baca1921dcadad
2019-01-23 08:40:50 -08:00
Remi NGUYEN VAN
fef17fd05f Merge changes I1250730c,I7d00848c
am: e693d49c0a

Change-Id: I2f19490a2340bdc2630162dfe9a277dffc5041fa
2019-01-23 08:26:33 -08:00
Remi NGUYEN VAN
63e61c427d Move IpClient to NetworkStack
Test: atest FrameworksNetTests NetworkStackTests
Bug: b/112869080
Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5
2019-01-23 16:44:21 +09:00
Chenbo Feng
a9382c9793 Use delta reads for per uid traffic stats
For the detailed network stats of each uid and tag, the native
implementation provides delta read instead of consistent stats
data since boot. Every time the readNetworkStatsDetail function gets
called, the data pulled will be cleared. We will keep a persistent data
since boot in NetworkStatsService instead.

Fixed some checkstyle complains in related files as well.

Bug: 79171384
Test: android.app.usage.cts.NetworkUsageStatsTest
      NetworkStatsServiceTest
Change-Id: I50bcf278739135081d522e50b0e88d76fd9ab131
2019-01-22 13:50:35 -08:00
junyulai
e07ef701d7 [automerger skipped] Merge "resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master" into stage-aosp-master am: 2c811e8843
am: b05c88fbf0 -s ours
am skip reason: change_id I3d94acb71c142ec38b750e58822881ff383341cc with SHA1 77c8591f9d is in history

Change-Id: I5d6fc7b41600f4ffda5dde6f3aea045edc01e24a
2019-01-21 11:01:38 -08:00
junyulai
b05c88fbf0 Merge "resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master" into stage-aosp-master
am: 2c811e8843

Change-Id: Ibdbccc7b205677c9f3e7b0b876c13c83c0c51a70
2019-01-21 10:53:47 -08:00
Mike SU
77c8591f9d fix getIfaceStats and getTotalStats bug
root cause: getIfaceStats and getTotalStats is directly reading
iface_stat_fmt or eBPF, not include tether stats.
solution: add tether stats to getIfaceStats and getTotalStats.

Clean cherry-pick of aosp/848934

Bug: 120039819
Test case1:
1. tether offload is enabled on phone, enable MHS on phone.
2. Use test app to check getMobileRxBytes->getIfaceStats
3. Download 10M file on MHS client
4. Use test app to check getMobileRxBytes->getIfaceStats again
result: getMobileRxBytes increased around 10M

Test case2:
1. tether offload is disabled on phone, enable MHS on phone.
repeat above step 2~4
result: getMobileRxBytes increased around 10M

Following CTS cases passed
run cts -m CtsNetTestCases --test android.net.cts.TrafficStatsTest
run cts -m CtsUsageStatsTestCases --test android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-21 20:55:06 +08:00
junyulai
19ec97e903 resolve merge conflicts of da290bec0c5418e758b92abad7be8e729cf37d68 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.

Change-Id: I719965f13d1f726fdac5b475fd8733b07e28f5b6
Merged-In: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-21 12:22:13 +00:00
Mike SU
3657ce9690 fix getIfaceStats and getTotalStats bug
root cause: getIfaceStats and getTotalStats is directly reading
iface_stat_fmt or eBPF, not include tether stats.
solution: add tether stats to getIfaceStats and getTotalStats.

Bug: 120039819
Test case1:
1. tether offload is enabled on phone, enable MHS on phone.
2. Use test app to check getMobileRxBytes->getIfaceStats
3. Download 10M file on MHS client
4. Use test app to check getMobileRxBytes->getIfaceStats again
result: getMobileRxBytes increased around 10M

Test case2:
1. tether offload is disabled on phone, enable MHS on phone.
repeat above step 2~4
result: getMobileRxBytes increased around 10M

Following CTS cases passed
run cts -m CtsNetTestCases --test android.net.cts.TrafficStatsTest
run cts -m CtsUsageStatsTestCases --test android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I3d94acb71c142ec38b750e58822881ff383341cc
2019-01-10 12:16:25 -06:00
Chenbo Feng
14c16b87a9 Merge "Adjust map names due to new bpfloader" am: 0317e9e374 am: 37cec67bdc
am: 50252f86f3

Change-Id: Iedbb541ba2fa5916048e3f40d5cc128a83d0dc6b
2019-01-09 11:34:54 -08:00
Chenbo Feng
50252f86f3 Merge "Adjust map names due to new bpfloader" am: 0317e9e374
am: 37cec67bdc

Change-Id: I28a2e41a354abdd8b2113c927a6489ea8710b431
2019-01-09 11:15:44 -08:00
Chenbo Feng
37cec67bdc Merge "Adjust map names due to new bpfloader"
am: 0317e9e374

Change-Id: If97a15a7f7b6a066bbf46db3497270a8c9a81026
2019-01-09 10:53:22 -08:00
Treehugger Robot
0317e9e374 Merge "Adjust map names due to new bpfloader" 2019-01-09 18:34:49 +00:00
junyulai
dad2d5ad85 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" am: a1e93d0a66 -s ours am: ac828b9ad4 -s ours
am: fa29021fb7 -s ours
am skip reason: subject contains skip directive

Change-Id: I4066f56a63322b6cf60d61927739f07846fd9e37
2019-01-08 21:37:53 -08:00
junyulai
fa29021fb7 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" am: a1e93d0a66 -s ours
am: ac828b9ad4 -s ours
am skip reason: subject contains skip directive

Change-Id: I3c3a25cd81aaff1a4d5ac7e5d4db9a03ea8f9d84
2019-01-08 21:24:13 -08:00
junyulai
ac828b9ad4 [automerger skipped] Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count"
am: a1e93d0a66 -s ours
am skip reason: subject contains skip directive

Change-Id: I3b55e5cac6168719dc586013707c8d270b148206
2019-01-08 21:19:09 -08:00
Treehugger Robot
a1e93d0a66 Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count" 2019-01-09 05:10:05 +00:00
junyulai
579bf97659 DO NOT MERGE: Revert: use legacy way to get tcp packet count
In Q, legacy way to get tcp packet count is not planned to be
supported. Users who use this unsupported API e.g., data stall
detection are also planned to be removed.

Thus, this change reverts 0b4a66a1c2 which is the short term
solution in P.

Bug: 110443385
Test: atest FrameworksNetTests
Change-Id: Ia09f908edbf194b9aa873a3bdd5aee7b6fcb16bc
2019-01-09 10:38:32 +08:00
Chenbo Feng
150dc6f187 Adjust map names due to new bpfloader
With the new loader support added. The bpf map format is defined by bpf
kernel program as well. Change the netd bpf program to the new format.

Test: CtsUsageStatsTestCases
Bug: 112334572
Change-Id: I34e38e0a8cf0cca54dc52ec897771452f9d90525
2019-01-04 12:06:35 -08:00
Junyu Lai
92c56063be Merge "Ignore ipv6 tx traffic on clat uid." am: 191f32fdc7 am: 9c0075aad0
am: 59c7f1a494

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b
2019-01-04 08:47:41 -08:00
Junyu Lai
59c7f1a494 Merge "Ignore ipv6 tx traffic on clat uid." am: 191f32fdc7
am: 9c0075aad0

Change-Id: I0f289ce46462f494adb99628bd504cafb584eeeb
2019-01-04 08:30:44 -08:00
Junyu Lai
9c0075aad0 Merge "Ignore ipv6 tx traffic on clat uid."
am: 191f32fdc7

Change-Id: I181c3c812caa9bcd359fbddf74d14adeb7e83419
2019-01-04 08:13:29 -08:00
Junyu Lai
191f32fdc7 Merge "Ignore ipv6 tx traffic on clat uid." 2019-01-04 09:29:10 +00:00
Xin Li
87765eff42 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" am: ab3b396c45 -s ours am: c8c0caf117 -s ours
am: 9144380565  -s ours

Change-Id: I10c1e303d19836aaaa2d5991925fe8a93fbc0791
2018-12-13 14:19:37 -08:00
Xin Li
74fa482baa [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master am: 6f9c73f8c9 -s ours am: 964a5fb469 -s ours
am: a437ec6cbb  -s ours

Change-Id: I998a4f2c8509815cf75e0b03e51831b325fbbea5
2018-12-13 13:54:36 -08:00
Xin Li
9144380565 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" am: ab3b396c45 -s ours
am: c8c0caf117  -s ours

Change-Id: I4988e15e6b919c6d237706dc578631c1cf9cc1fa
2018-12-13 13:01:05 -08:00
Xin Li
c8c0caf117 [automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
am: ab3b396c45  -s ours

Change-Id: I7710a0b1a5ba1bf7acd45d694818aec91853e546
2018-12-13 12:47:28 -08:00
Xin Li
a437ec6cbb [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master am: 6f9c73f8c9 -s ours
am: 964a5fb469  -s ours

Change-Id: Icf77675866d843c8d6d5cc30ea1a5f1d8f0cfba7
2018-12-13 12:16:11 -08:00
Chenbo Feng
e817e16c32 Merge "Delete unused import" am: e726c2654d am: 76b4d2fba2
am: 6f97b16072

Change-Id: I577371244d45a3b93e3e5f4a02747a51fd42d363
2018-12-13 11:20:14 -08:00
Xin Li
964a5fb469 [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 6f9c73f8c9  -s ours

Change-Id: I60ae19c5ff7d5de669fac1ebd93d48283d9f27d8
2018-12-13 11:18:53 -08:00
Chenbo Feng
6f97b16072 Merge "Delete unused import" am: e726c2654d
am: 76b4d2fba2

Change-Id: Ia8e3487aeb24129fce0ed55c9965809c7e3d87cd
2018-12-12 22:32:11 -08:00
Chenbo Feng
76b4d2fba2 Merge "Delete unused import"
am: e726c2654d

Change-Id: I8249bd4340b6e6e2e0a4fa687207198b534168b1
2018-12-12 22:18:40 -08:00
Treehugger Robot
ab3b396c45 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Chenbo Feng
f9eff38d9b Delete unused import
The hasBpfSupport() check from BpfUtils is not used by the native helper
in framework. Remove them.

Bug: 111441138
Test: Build without failure.
Change-Id: Icdd01bf1a03efd7883e4939d0d730303ec1004e7
2018-12-13 00:46:20 +00:00
Adrian Roos
6c9293fedf [automerger skipped] Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" am: af0e1c2fa5 am: ee2ba33204
am: a58161f70f  -s ours

Change-Id: I1e0c087f4f5dd08a607aae0ac08fac47ee12bfeb
2018-12-12 08:58:28 -08:00
Adrian Roos
a58161f70f Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" am: af0e1c2fa5
am: ee2ba33204

Change-Id: I2251db66ef73d5b69c84b4e83f2788d2bc953eda
2018-12-12 08:44:43 -08:00