Commit graph

1,235 commits

Message SHA1
Adding bt apex
Bug: 206121418
Test: Compile
Change-Id: Ia117cc35a885ba74c98a67b061a648f96dd78228

Roopa Sattiraju   commited 2022-02-03 21:52:14 -08:00
98fa3bfdac
Merge "Include libtcutils inside libnet_utils_device_common_bpfjni"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-02-02 19:38:56 +00:00
417968e4cf
Make the struct "not a subclass of Struct" error message clearer.
Test: treehugger
Change-Id: Ia281e186db258af3629c10b260971201380f33f4

Lorenzo Colitti   commited 2022-02-02 00:25:30 +00:00
f17790f661
Merge "Mark VisibleForTesting members as public"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-02-01 08:58:29 +00:00
35ef7bf5a0
Include libtcutils inside libnet_utils_device_common_bpfjni
This way, users of libnet_utils_device_common_bpfjni do not also have to
separately list the required libtcutils.

Test: build, boots
Change-Id: Id40863de83b6c40b79f38d638299626f7e025810

Patrick Rohr   authored and   Maciej Żenczykowski   commited 2022-02-01 03:07:46 +00:00
23077d5a49
Mark VisibleForTesting members as public
Package-private members are not visible across jars; with the latest
refactoring of build and jarjar rules for connectivity, tests fail as
the utils are picked up from the on-device module rather than the test
package, and such members could not be found.

Bug: 204830222
Test: atest ConnectivityCoverageTests
Change-Id: Ia62b01e2e3123a2d8a432c061e3c576c86356df5

Remi NGUYEN VAN   commited 2022-01-31 21:55:43 +09:00
5c080dc85b
Merge "Use module API in common libraries"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-01-31 12:15:08 +00:00
7e5cf2c0c9
Merge "[LSC] Add LOCAL_LICENSE_KINDS to frameworks/libs/net"
Bob Badour   authored and   Gerrit Code Review   commited 2022-01-28 02:14:18 +00:00
ef3997c70e
Merge "Add Override for onDscpPolicyStatusUpdated"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-01-27 23:25:54 +00:00
e6cb32b01b
[LSC] Add LOCAL_LICENSE_KINDS to frameworks/libs/net
Added SPDX-license-identifier-Apache-2.0 to:
  common/native/nettestutils/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: If5fcd4735fe82f336227626a443bba1d74201722

Bob Badour   commited 2022-01-27 10:46:23 -08:00
ae85125761
Merge "Fix add missing loadLibrary to TcUtils"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-01-27 10:31:02 +00:00
da4d59d268
Merge "Add U8 subclasses to Struct"
Mark Chien   authored and   Gerrit Code Review   commited 2022-01-27 10:02:35 +00:00
e69c4b0e52
Merge "[MS48.3] Allow Settings package to build with network static libs"
Frank Li   authored and   Gerrit Code Review   commited 2022-01-27 08:47:55 +00:00
b45d2dbaa7
Fix add missing loadLibrary to TcUtils
This has been working so far because BpfMap loads the .so for the
Tethering APK (as they both are part of the same library).

Test: device boots
Change-Id: I21feecd1b6121e24bb8e98255940aae661ff6270

Patrick Rohr   commited 2022-01-27 05:31:39 +01:00
836bd6b5ae
Add U8 subclasses to Struct
BPF maps require classes to extend struct.
U8 is used as value of UidCounterSetMap.

Test: m
Change-Id: Ieacc6d83c9c55cbe2b4513e7e8356fbe4a7d0058

markchien   commited 2022-01-26 22:38:31 +08:00
775e434078
Merge "libclat: Use space indentation instead of tab"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 19:18:34 +00:00
fe116d0308
[MS48.3] Allow Settings package to build with network static libs
Settings app used NetworkStatsHistory#getValues to fetch rational
bytes of the history. However, this functionality will not be
available after mainling NetworkStats. Thus, allow Settings
to build with NetworkStatsUtils for implementing alternative
solution.

Test: atest clockwork-settings-robotests
      make RunSettingsRoboTests -j40
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=DataUsageControllerTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleChartDataLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleDataForUidLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleDataLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=DataUsageUtilsTest
Bug: 204830222
Ignore-AOSP-First: Related API conflict, need master first.

  (cherry-picked from ag/16681887)

Change-Id: I8f8b6160fdc78ee91e4ce84c07faef3a0408e489
Merged-In: I8f8b6160fdc78ee91e4ce84c07faef3a0408e489

Junyu Lai   authored and   Frank   commited 2022-01-25 22:21:17 +08:00
b24df14433
Merge "Add a DumpTestUtils class to do service dumps in tests."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-01-25 13:30:17 +00:00
d54e3b97b0
libclat: Use space indentation instead of tab
Correct the indentation style of libclat in the follows
bpf_headers/Android.bp
bpf_syscall_wrappers/Android.bp

Test: build
Change-Id: I7cdd354141124fa8f7b4a864ddd937bef4676302

Hungming Chen   commited 2022-01-25 20:09:09 +08:00
51fecf19e2
Use module API in common libraries
Update libraries that still use system_current to module_current.

This is necessary for usage in some modules, as a dependency on
system_current libraries could cause circular dependencies.
system_current includes the API surface of all modules, so module API
jars cannot depend on it transitively.

Also remove framework-annotations from net-utils-framework-common
sources. This is a long overdue cleanup, and without it module API jars
would include unintended API classes when including
net-utils-framework-common.

Bug: 204830222
Test: m
Change-Id: I8f15a95a5951a644b080f5f655ffb846b900193c

Remi NGUYEN VAN   commited 2022-01-25 19:13:37 +09:00
7f0d0e3865
Add a DumpTestUtils class to do service dumps in tests.
This allows tests to run dumpsys without worrying too much about
the nitty-gritty of finding the service, piping the output back,
etc.

Test: simple test added in other CL in topic
Change-Id: I0628c55ad199e4c888e4947e11bdb0a3b8150767

Lorenzo Colitti   commited 2022-01-25 17:35:18 +09:00
375241c99b
Merge "Add BPF_ANNOTATE_KV_PAIR to BPF map definition macros"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 02:31:59 +00:00
ba9eeabd14
Merge changes from topic "configure_bpf_for_clat"
* changes:
  make bpf_headers visible to libclat
  make bpf_syscall_wrappers visible to libclat

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-24 19:14:35 +00:00
4772d859a7
Merge changes from topic "bpfinterfacemap"
* changes:
  Decouple "net-utils-framework-common" from "net-utils-device-common-bpf"
  Add visibility for use bpfmap by BpfInterfaceMapUpdater

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-24 19:05:27 +00:00
b7bc68fd76
Decouple "net-utils-framework-common" from "net-utils-device-common-bpf"
Currently "net-utils-device-common-bpf" statically link whole
"net-utils-device-common-struct" which would also pull in
"net-utils-framework-common". Since the classes in
net-utils-framework-common would be loaded into bootclass path, it would
cause sytem server service which located in platform code (the class in
/system/framework/service.jar) not able to use net-utils-device-common-bpf
library.

There is a cts to protect this:
StrictJavaPackagesTest#testBootClasspathAndSystemServerClasspath_nonDuplicateClasses

Bug: 215095957
Test: atest FrameworkNetTests
Change-Id: I232bd21c666dd44f7d0b8cc84610e8cd37dc383c

markchien   authored and   Maciej Żenczykowski   commited 2022-01-24 19:02:53 +00:00
be96036a63
Clean up bpf_headers visibility
The bpf_headers no need to explicitly specify visibility for
system/netd/libnetdbpf. The libnetdbpf depends on
bpf_connectivity_headers, which exports bpf_headers already.

Bug: 202086915
Test: m
Change-Id: I09a073b14dc74511ba9dc09a89ae6e89dff51f4d

Ken Chen   commited 2022-01-23 15:57:25 +08:00
945c8b2638
Add Override for onDscpPolicyStatusUpdated
Add override to allow for DscpPolicyTest to use updated
NetworkAgent callbacks.

Bug: 202871011
Change-Id: I2082f6553e56ff941a309e031184d6e0dfb88514

Tyler Wear   commited 2022-01-21 11:32:35 -08:00
580cabf981
Merge "Add DSCP Status Callback to TestableNetworkAgent"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-21 19:03:11 +00:00
11e656cbf8
Merge "Add IBpfMap for injection in testing"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-21 18:33:26 +00:00
d48592befb
Add visibility for use bpfmap by BpfInterfaceMapUpdater
Bug: 215095957
Test: m
Change-Id: Idbb8e3cbf520a29444ccdfd2d1c42553c886a7f0

markchien   commited 2022-01-21 22:33:38 +08:00
32a6e9cbde
Add IBpfMap for injection in testing
To avoid load jni library in some testing (BpfMap load jni library
statically), add IBpfMap for injection.

Bug: 215095957
Test: atest FrameworkNetTests
Change-Id: I71e67f9cdc19a856fe5dce5940be702e866b87c4

markchien   commited 2022-01-21 22:32:44 +08:00
2e5fece3bf
Merge "Move NetlinkListener relevant files to frameworks/libs/net"
Wayne Ma   authored and   Gerrit Code Review   commited 2022-01-21 13:50:08 +00:00
9c4615877b
Merge "Add U32 S64 subclasses to Struct"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-21 08:28:24 +00:00
5f67cc4ab9
Merge "Update case to correctly support usage for T"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-01-21 06:34:29 +00:00
a1c185837c
Add BPF_ANNOTATE_KV_PAIR to BPF map definition macros
BPF_ANNOTATE_KV_PAIR is used by libbpf to associate each map with its
BTF information. This is ignored for programs compiled without BTF
information.

Bug: 203823368
Test: build & boot; confirm all bpf progs load successfully
Test: compile time_in_state.o with -g; confirm BTF is loaded
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I45f294945d48106d39d1d105ac4f49311459a19d

Connor O'Brien   commited 2022-01-20 21:22:24 -08:00
56875455c2
Add DSCP Status Callback to TestableNetworkAgent
Add new callback for Dscp status's.

Test: atest DscpPolicyTest
Change-Id: Ib47c246e3f92045ca32b681b380315dfdfedc182

Tyler Wear   commited 2022-01-21 05:21:48 +00:00
ee9f5afef5
Add U32 S64 subclasses to Struct
BPF maps require classes to extend struct. Adding U32 and S64
classes to be used in QoS and BpfBitmaps.

Bug: 202871011
Change-Id: Idc0660240fafba0b199772b100ff69c362599403

Tyler Wear   commited 2022-01-21 05:17:05 +00:00
3e5e525165
Merge changes from topic "tc-police"
* changes:
  Move logging helper to own file
  Add tc police support in TcUtils.java
  Add tc police support to jni lib
  Add functionality to attach tc-police action to ingress qdisc
  Add tests for adding / deleting bpf filter
  Add support to attach / replace / detach clsact qdisc to libtcutils
  Add tests for libtcutils
  Fix kernelversion.h

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-21 01:52:42 +00:00
171da02e3f
Merge "Add libnettestutils as a networking test utility"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-01-21 00:46:45 +00:00
68be98ab00
Merge "Update net-tests-utils-host-common tag to "mts-networking""
Kimberly Kreider   authored and   Gerrit Code Review   commited 2022-01-20 22:22:59 +00:00
3786fb81da
Move NetlinkListener relevant files to frameworks/libs/net
NetlinkListener is used by Netd, so move it to frameworks/libs/net
and then it can be used by platform code and mainline module.

Bug: 209935649
Test: m; flash; boot
Change-Id: I4cf0e64eee1dda1e452d76af77642416c9729d42

Wayne Ma   commited 2022-01-20 15:07:46 +08:00
b48a1205be
Update case to correctly support usage for T
Update condition to correctly support the usage for T.
Also update the S code since it was updated to corresponding
number.

Bug: 215294242
Test: test using DevSdkIgnoreRule
Change-Id: Ia94cb7f5a0aaf92515e5e2b924d1ab6cc050e074

Chiachang Wang   commited 2022-01-20 11:26:51 +08:00
3e6dd45b85
Update net-tests-utils-host-common tag to "mts-networking"
We use "mts-networking" and not "mts" so that the tests and test dependencies can be properly included in the automated MTS packaging and release (go/mts-packaging).
Instead of tagging tests "mts", we should use "mts-*" where the suffix is one of https://source.corp.google.com/android/test/mts/tools/build/config.mk;l=19.

Test: built locally and verified contents
Bug: 203466102
Change-Id: I5f9bdaf699cfa2525b33178c0e30a6b794b9d5f5

Kimberly Kreider   commited 2022-01-19 23:02:23 +00:00
c9232670c2
Add libnettestutils as a networking test utility
The library provides a helper function that can retrieve dumpsys
results from a specific service. It can also take dumpsys arguments.

Bug: 29761778
Bug: 202086915
Test: test in Ib4aeb385ab80187feb39b659274a0aee20a4a5ed

Change-Id: Ib2ab8b6e4136bd3cbc52b025e53a1fa0c4e91709

Ken Chen   commited 2022-01-20 01:38:00 +08:00
76ee6106f5
Move logging helper to own file
And rename to ALOGE to be in line with liblog.

Test: builds
Change-Id: I6c33f78a0649b273f75ebf05ea5ba3689beabc24

Patrick Rohr   commited 2022-01-19 14:54:37 +01:00
28c717a03e
Add tc police support in TcUtils.java
Bug: 157552970
Test: TreeHugger
Change-Id: I60be5ea3ac361f4b5d09b8cc2290d10adb18a39f

Patrick Rohr   commited 2022-01-19 14:20:27 +01:00
97a0e80f0a
Add tc police support to jni lib
Bug: 157552970
Test: TreeHugger
Change-Id: I63b4324bbb8d20b7d401921dad1f8e73ccc26a39

Patrick Rohr   commited 2022-01-19 14:20:27 +01:00
eb3a8c734b
Add functionality to attach tc-police action to ingress qdisc
This is used for go/bandwidth-limiting.

Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: Ic8e4d8dc016b14a6d4fc8ddbb3949941e9ef95af

Patrick Rohr   commited 2022-01-19 14:20:27 +01:00
e815a7462f
Add tests for adding / deleting bpf filter
Bug: 202086915
Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: I8adcb3df29e4b3e0c558714f90b2840698e40cb9

Patrick Rohr   commited 2022-01-19 14:20:27 +01:00
1f7ba259c3
Add support to attach / replace / detach clsact qdisc to libtcutils
Bug: 202086915
Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: I2f2e2f66acb7590e8951ac6e178c5893ba635597

Patrick Rohr   commited 2022-01-19 14:20:27 +01:00
42b58ae836