Commit graph

43,661 commits

Message SHA1
Merge "Send exclude local routes value to netd for VPN network"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-01-26 02:09:35 +00:00
317be96553
Merge changes from topic "preparation_fork_clatd_from_system_server"
* changes:
  [CLATJ#24] ClatCoordinatorTest: add basic unit tests
  [CLATJ#23] Close the file descriptor manually
  [CLATJ#22] ClatCoordinator: stop clatd
  [CLATJ#21] ClatCoordinator: start clatd

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-26 00:26:48 +00:00
43f9729e90
Merge "Correct typos in libnetworkstats"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 23:52:32 +00:00
1b5f93df43
Merge changes from topic "libnetworkstats"
* changes:
  Rename libnetdbpf to libnetworkstats
  Copy libnetdbpf from system/net to tethering module

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 23:52:06 +00:00
e1f8ad4d59
Merge "Add low latency and high bandwidth network capabilities"
Sooraj Sasindran   authored and   Gerrit Code Review   commited 2022-01-25 21:06:16 +00:00
d8645e27c7
Merge "adjust BpfCompatTest now that clatd & netd bpf program have been mainlined"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 19:07:13 +00:00
e0904b5a12
adjust BpfCompatTest now that clatd & netd bpf program have been mainlined
The purpose of this test is to verify that the bpfloader related
stuff in the platform is compatible with mainline module bpf .o's.

To be more precise: the test is trying to check that platform/OEM
BPF programs (and, by implication, the platform/OEM bpfloader) have
a struct layout that is known, and thus that BPF programs shipped
in mainline modules will be compatible (with the OEM bpfloader).

(ie. basically this is trying to make sure that the vendor/oem
haven't made incompatible changes to the bpfloader parsed structs,
these can only be extended safely in aosp master)

Since clatd/netd.o have been moved to mainline they are no longer
a useful representation of the state of the platform side of things.
(we'd simply be testing that mainline is compatible with mainline,
which of course it is...)

As such we pick two other bpf .o files that are still shipped
as part of the platform.

Verified on cuttlefish via 'atest CtsNativeNetTestCases':
  x86 CtsNativeNetTestCases
  -------------------------
  CtsNativeNetTestCases (2 Test(s))
  [1/2] BpfTest#bpfStructSizeTestPreT: IGNORED (0ms)
  [2/2] BpfTest#bpfStructSizeTest: PASSED (0ms)

  Summary (Test executed with 1 device(s).)
  -------
  x86 CtsNativeNetTestCases: Passed: 1, Failed: 0, Ignored: 1, Assumption Failed: 0,

  All tests passed!

Note: it's not clear to me if this code can even ever be run on pre-T devices...
but I guess it shouldn't hurt.

Bug: 215718693
Test: atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1b2d76e5ef95d8e4b94068f5525263653879d1f4

Maciej Żenczykowski   commited 2022-01-25 19:06:51 +00:00
45f940a9ee
Add low latency and high bandwidth network capabilities
Bug: 194332512
Test: build
Change-Id: I415ca1ba90ea54c4106f806fe855bcb84d3e38ba

Sooraj Sasindran   commited 2022-01-25 09:35:30 -08:00
f8eb713874
Merge "[DU09-1]Adding the NetworkStatsCollection Builder"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-25 16:44:16 +00:00
41483efa02
Merge "[MS68.2] Adapt NetworkPolicyManagerService to use registerUsageCallback"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-25 13:30:57 +00:00
bc8328bda4
Merge "Add a simple test for ConnectivityService#dump."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-01-25 13:30:17 +00:00
4e9ab4dde0
[CLATJ#24] ClatCoordinatorTest: add basic unit tests
Introduce ClatCoordinatorTest for unit tests of class ClatCoordinator.
Add the tests:
- testStartStopClatd
- testGetFwmark
- testAdjustMtu

Bug: 212345928
Test: atest FrameworksNetTests
Change-Id: I6908eac05b14077b450d51e1432d340c8a247eb1

Hungming Chen   commited 2022-01-25 20:32:25 +08:00
358d582730
[CLATJ#23] Close the file descriptor manually
ParcelFileDescriptor rely on garbage collection to close handler.
When there is any error during starting clat or quick on/off
IPv6 only network, the file descriptor may not be able to be closed
before next clatStart is called. This may be problematic. For
example, the same v4- tun interface has not closed yet and clatStart
has been called again.

Test: connect/disconnect to IPv6 only network and ping 8.8.8.8
      repeat 10 times
Change-Id: I8e1c66206dc221827a039213ecc86d5cbd777dff

Hungming Chen   commited 2022-01-25 20:32:11 +08:00
d7b63f8f93
[DU09-1]Adding the NetworkStatsCollection Builder
The purpose is provide NetworkStatsCollection.Builder as
public API for adding the stats {@link NetworkStatsHistory}

Bug: 215862801
Test: atest NetworkStatsCollectionTest
Change-Id: Id83c6fa67880ba361b8e0e15c4d86b90e44ac879

Frank   commited 2022-01-25 19:43:23 +08:00
c8856596c5
[CLATJ#22] ClatCoordinator: stop clatd
provide clatd stop function which stops clatd by pid.

Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a follow commit.

Change-Id: Icd9c4f9038bf75113fbc5608f213145e58a061d9

Hungming Chen   commited 2022-01-25 18:44:09 +08:00
9d11ddfd5c
[CLATJ#21] ClatCoordinator: start clatd
launch clatd with the given cli arguments.

Bug: 212345928
Test: flash and boot
- run "atest ClatCoordinatorTest" in a follow commit.
- manual test
  1. Connect to ipv6-only wifi.
  2. Try IPv4 traffic.
     $ ping 8.8.8.8

Change-Id: Ie57a7c7a9d3d77396e91fa9f94c02f1ad05487c1

Hungming Chen   commited 2022-01-25 18:43:59 +08:00
9625caa8e5
Merge "Add jarjar rules for service-connectivity-tiramisu-pre-jarjar"
Paul Hu   authored and   Gerrit Code Review   commited 2022-01-25 04:15:41 +00:00
eead25d263
Merge "Replace some netd calls in NetworkManagementService"
Mark Chien   authored and   Gerrit Code Review   commited 2022-01-25 03:34:54 +00:00
7586d33f22
Merge "Replace INetd#trafficSwapActiveStatsMap with ConnectivityManager API"
Mark Chien   authored and   Gerrit Code Review   commited 2022-01-25 03:34:14 +00:00
f3cf7c00a6
Merge "[MS67.2] Modify tests for registerUsageCallback"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-25 01:23:45 +00:00
3f9584bfda
make clatd 0755 instead of 0555
Bug: 215897658
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4c5fa8b4cd07a6e2ca2128943336a7a5d05712d4

Maciej Żenczykowski   commited 2022-01-24 19:27:15 +00:00
e04edee45f
Merge changes from topic "configure_bpf_for_clat"
* changes:
  [CLATJ#20] ClatdCoordinator: stop bpf for clat
  [CLATJ#19] ClatdCoordinator: configure bpf for clat
  [CLATJ#18] libclat: move clat tc and bpf utilis from netd
  [CLATJ#17] bpf_connectivity_headers visible to libclat

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-24 19:14:35 +00:00
f807ec7da7
Merge "Add unit test for BpfInterfaceMapUpdate"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-24 19:05:28 +00:00
d512ec646c
Merge "Add support for Multiple enterprise slice"
Sooraj Sasindran   authored and   Gerrit Code Review   commited 2022-01-24 16:26:03 +00:00
0311ea0bc6
[MS68.2] Adapt NetworkPolicyManagerService to use registerUsageCallback
This change also address comments at aosp/1958145.

Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: I415d74df34caa91b1e1160478ebff30fbd1c7b6f

junyulai   commited 2022-01-24 22:12:42 +08:00
0a007c248c
[MS67.2] Modify tests for registerUsageCallback
Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: Ia4ff535cd703807516d65b582727684cbb670360

junyulai   commited 2022-01-24 18:59:23 +08:00
f8a1d3e5e6
Merge changes from topics "ms56-historybuilder", "ms65.3"
* changes:
  [MS56.2] Add unit test for NetworkStatsHistory#Builder
  [MS65.4] Address comments at aosp/1954383

Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-24 05:41:10 +00:00
4794105511
Correct typos in libnetworkstats
Fix Typo-Lints in I23aad26d487b4d99e24ffecf79eeef3f8eea664b

Bug: N/A
Test: m
Change-Id: Id9df0a279e7aad048f2c0d7be66dec40e5a8ae8a

Ken Chen   commited 2022-01-24 11:54:04 +08:00
cc764a13fa
Rename libnetdbpf to libnetworkstats
Two reason for renaming:
1. Avoid module name collision in sc-mainline-prod branch.
2. The libnetdbpf was misnamed before.

Bug: 202086915
Test: atest libnetworkstats_test FrameworksNetTests
      ConnectivityCoverageTests FrameworksNetSmokeTests
      CtsAppOpsTestCases
Change-Id: I87fcf4b1a9d58780a45743a9aa91b9b936e54266

Ken Chen   commited 2022-01-24 11:53:59 +08:00
f426b2b287
Add jarjar rules for service-connectivity-tiramisu-pre-jarjar
- Add rule for modules-utils-statemachine lib.

Bug: 206893064
Test: m
Change-Id: Ia70a86be0f52f9aecddd9716d3a3a266aef35bc8

paulhu   commited 2022-01-24 10:56:29 +08:00
824b001b74
Copy libnetdbpf from system/net to tethering module
This is a clean copy (that can't build). Modifications will be in
followed commits.

Bug: 202086915
Test: $ diff -r
      packages/modules/Connectivity/service-t/native/libs/libnetdbpf/
      system/netd/libnetdbpf/
      (no different)
No-Typo-Check: Clean move
Change-Id: I23aad26d487b4d99e24ffecf79eeef3f8eea664b

Ken Chen   commited 2022-01-24 06:14:38 +08:00
f2bb7b1ae8
[NETD-TC#14] Add traffic controller JNI to tethering module
This CL provides native methods to access BPF maps via a native library.

Bug: 202086915
Test: m; flash; boot;
Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29

Wayne Ma   commited 2022-01-24 00:22:26 +08:00
790c83e387
Fix TEST_MAPPING format
Bug: N/A
Test: m
Change-Id: I16760dcea531ff3a20d53dace7b919c877c378b9

Wayne Ma   commited 2022-01-23 23:45:11 +08:00
320b95dd6d
Merge "[NETD-TC#13] Make TrafficControllerTest as traffic_controller_unit_test"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-01-23 14:57:48 +00:00
a92465745c
[NETD-TC#13] Make TrafficControllerTest as traffic_controller_unit_test
Delete tagSocket(), privilegedTagSocket() and untagSocket() revelant
test cases since thay are moved out of TrafficController in
aosp/1849156.

Bug: 202086915
Test: atest traffic_controller_unit_test passed
Change-Id: I605577ee4d7076f0c8ad75888a4d32bff90f6104

Wayne Ma   commited 2022-01-23 21:26:09 +08:00
7be6bce52d
[MS56.2] Add unit test for NetworkStatsHistory#Builder
Test: atest NetworkStatsHistoryTest#testBuilder
Bug: 204830222
Change-Id: Id876340bcab7290d5e191dbdfcce7fb4d8ecf96c

Junyu Lai   authored and   junyulai   commited 2022-01-23 20:52:31 +08:00
6d95db48d0
[MS65.4] Address comments at aosp/1954383
Test: atest NetworkIdentityTest#testBuilder
Bug: 204830222
Change-Id: I3d0f8175ee782c76839cbbdb5eb8a1219a61d874

Junyu Lai   authored and   junyulai   commited 2022-01-23 20:52:31 +08:00
84413a92c3
Add support for Multiple enterprise slice
Bug: 194332512
Test: unit test
CTS-Coverage-Bug: 211133973
Change-Id: Ie8be08a7cfa9155168d1da146d02fd1643248bdc

Sooraj Sasindran   commited 2022-01-22 14:39:40 -08:00
f4a58dcd45
wifi data usage: Update calling API name
Bug: 213387087
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c FrameworksWifiApiTests
Test: atest -c NetworkPolicyManagerServiceTest
Change-Id: I6f65af5e2ff121a2fe5b2429d3eead01e434f8be
Merged-In: I6f65af5e2ff121a2fe5b2429d3eead01e434f8be

Les Lee   commited 2022-01-23 00:07:02 +08:00
c71f2d7425
[CLATJ#20] ClatdCoordinator: stop bpf for clat
Remove eBPF offload at clat stopping if possible.

Bug: 212345928
Test: build only
because need to test with clatd launched

Change-Id: I6ace77694c0e6fe68d16e80e3c8198aa41385fd2

Hungming Chen   commited 2022-01-22 20:07:30 +08:00
fb676b58e0
[CLATJ#19] ClatdCoordinator: configure bpf for clat
Configure eBPF offload at clat starting if possible.

Bug: 212345928
Test: connect to ipv6 only network and check bpf entries
$adb shell dumpsys netd --short | grep Clat -A10
  ClatdController
    Trackers: iif[iface] nat64Prefix v6Addr -> v4Addr v4iif[v4iface] [fwmark]
    BPF ingress map: iif(iface) nat64Prefix v6Addr -> v4Addr oif(iface)
      47(wlan0) 64:ff9b::/96 2a00:79e1:abc:6f02:b7aa:ff3c:9220:595c -> 192.0.0.4 52(v4-wlan0)
    BPF egress map: iif(iface) v4Addr -> v6Addr nat64Prefix oif(iface)
      52(v4-wlan0) 192.0.0.4 -> 2a00:79e1:abc:6f02:b7aa:ff3c:9220:595c 64:ff9b::/96 47(wlan0) ether

Change-Id: I8ff77a2e3e86bfe6dbf43f4181414e444ba0da32

Hungming Chen   commited 2022-01-22 20:07:24 +08:00
b1d3ccbeb6
[CLATJ#18] libclat: move clat tc and bpf utilis from netd
Move native functions from ClatdController and TcUtils to libclat
for jni ClatdCoordinator.

Bug: 212345928
Test: atest libclat_test
Change-Id: Ia4b344b07537d57c3e4ff1285b0e7b17e0c63c3e

Hungming Chen   commited 2022-01-22 20:07:19 +08:00
8ebdb6f1fe
[CLATJ#17] bpf_connectivity_headers visible to libclat
Needed because ClatdController and clatd binary are moved
into apex. libclat is used for accessing BPF map.

Bug: 212345928
Test: build
Change-Id: I1be5d4c9cc2c9865ac99f2595443e54e7334c843

Hungming Chen   commited 2022-01-22 20:06:55 +08:00
99b9ae3787
[NETD-TC#11] Make TrafficController as libtraffic_controller into
Tethering module.

Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.

Bug: 202086915
Test: m; flash; boot;
Change-Id: Ifeaeb060fbf1add9f06748e7846b9e11e0345bda

Wayne Ma   commited 2022-01-22 12:33:49 +08:00
a9716ffcb8
Merge "bump tethering tc prio to make room for rate limiting"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-01-21 18:19:43 +00:00
29d5f0adbe
Merge changes from topic "clean_move_and_delete"
* changes:
  Delete dead codes within TrafficController in mainline module
  Move TrafficController relevant files from netd to mainline module

Wayne Ma   authored and   Gerrit Code Review   commited 2022-01-21 17:10:07 +00:00
0c155199c0
Merge "Ability to specify which all applications fall under enterprise slice."
Sooraj Sasindran   authored and   Gerrit Code Review   commited 2022-01-21 16:01:44 +00:00
a2e98bdc1a
Delete dead codes within TrafficController in mainline module
Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.

Test: m
Change-Id: I6162c758446f597eb79734e00348dc8b1fe2d422

Wayne Ma   commited 2022-01-21 15:45:09 +00:00
92d80790d3
Move TrafficController relevant files from netd to mainline module
git diff packages/modules/Connectivity/service/native/TrafficController.cpp system/netd/server/TrafficController.cpp
git diff packages/modules/Connectivity/service/native/TrafficControllerTest.cpp system/netd/server/TrafficControllerTest.cpp
git diff packages/modules/Connectivity/service/native/include/TrafficController.h system/netd/server/TrafficController.h

Test: m
No-Typo-Check: clean move
BYPASS_INCLUSIVE_LANGUAGE_REASON= clean move
Change-Id: I7c0200e28e5e4459477d370912277fa1281b786b

Wayne Ma   commited 2022-01-21 15:37:34 +00:00
4d69233e63
Add unit test for BpfInterfaceMapUpdate
Bug: 215095957
Test: atest FrameworkNetTests

Change-Id: I92d45e5a606f466ce42504629cb3f87fd9e25d22

markchien   commited 2022-01-21 23:34:25 +08:00
adf119a8ed