Commit graph

114,472 commits

Message SHA1
Pass trackingReason directly
This seemed to have been an oversight in the original change. There is
no need to call getInterfaceTrackingReason here; it can just use the
tracking reason that is passed to the function (and passed to
addInterface above).

Test: TH
Flag: EXEMPT mainline
Change-Id: I33322c5bfeaaf8f11f3251aff1b1ccac845a993b

Patrick Rohr   commited 2025-08-25 11:14:45 -07:00
5b27c39564
Merge "NetBpfLoad: use macro for mainline beta flag" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:54:37 -07:00
c528cbf687
Merge "tcpAccECN: remove duplicated definitions of load_word and load_half" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:52:10 -07:00
bfd1b36ea0
Merge "tcpAccECN: add build target" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:51:00 -07:00
96694e36ca
Merge "tcpAccECN: update DEFINE_BPF_PROG to follow the current syntax" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:50:16 -07:00
0562b55916
Merge "tcpAccECN: remove CRITICAL" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:49:28 -07:00
e77c943066
Merge "tcpAccECN: define required macros" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:49:01 -07:00
c36345cfdf
Merge "tcpAccECN: remove carriage returns" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:48:05 -07:00
23215028c4
Merge "NetBpfLoad: Add default map flag for BPF_MAP_TYPE_LRU_HASH" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-25 10:47:16 -07:00
2de52a3d0b
NetBpfLoad: use macro for mainline beta flag
Flag: com.android.tethering.readonly.flags.use_libbpf
Bug: 428792764
Test: Enable/Disable flag, boot, adb shell logcat
Change-Id: I40e6124f6c96cf09ce50f38d786f15847ec6f69d

Motomu Utsumi   commited 2025-08-25 20:54:37 +09:00
aa8717db44
tcpAccECN: remove duplicated definitions of load_word and load_half
bpf_helpers.h has the same definitions

Test: m tcpAccECN.o
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Ie5b47bdcbc2aa8d4563cf3ec0806f8dfc6861801

Motomu Utsumi   commited 2025-08-25 16:10:56 +09:00
5cb1506a75
tcpAccECN: add build target
Test: m tcpAccECN.o
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Id8f5e3cfb55b3b698b496dbb4beee857a5a4c87a

Motomu Utsumi   commited 2025-08-25 16:02:04 +09:00
86a3a4a7ca
Add metrics for BPF shim initialization error
```
statsd_testdrive 979

metric_id: 1111
event_metrics {
  data {
    aggregated_atom_info {
      atom {
        979: {
          1: 15
        }
      }
      elapsed_timestamp_nanos: 66003587918
      elapsed_timestamp_nanos: 66004273970
      elapsed_timestamp_nanos: 72331748965
      elapsed_timestamp_nanos: 72332440169
      elapsed_timestamp_nanos: 77164965823
      elapsed_timestamp_nanos: 77165560176
    }
  }
}
is_active: true
estimated_data_bytes: 60
```

Flag: EXEMPT mainline
Bug: 430428550
Test: statsd_testdrive
Change-Id: I3bc5975545589ab51af5312038830b94251c11ee

Jimi Chen   commited 2025-08-25 04:13:38 +00:00
95c9e42669
tcpAccECN: update DEFINE_BPF_PROG to follow the current syntax
This CL also sets the min kver to 5.10.
skb_tcp_flags field in bpf_sock_ops was introduced on 5.10 kernel

Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I71696e0bf3b36296c5f2e7fd5b692406d96ddf97

Motomu Utsumi   commited 2025-08-25 13:04:48 +09:00
bf24fdbcc2
tcpAccECN: remove CRITICAL
CRITICAL section was removed by ag/33605170

Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I6de89edd7547ede1ecdd18b5ee80fb9bc1977915

Motomu Utsumi   commited 2025-08-25 12:55:14 +09:00
9d5f30d8d6
tcpAccECN: define required macros
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I9fbbd03d5bf2d6955082dfdb6f7e9279ad840b61

Motomu Utsumi   commited 2025-08-25 12:55:14 +09:00
4f585bdfac
tcpAccECN: remove carriage returns
$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.c
$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.h

Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Iffde87607e95920dc839e6901e0ba40912f83a49

Motomu Utsumi   commited 2025-08-25 12:55:14 +09:00
c2c0572ae8
NetBpfLoad: Add default map flag for BPF_MAP_TYPE_LRU_HASH
Test: TH
Bug: 440448408
Flag: EXEMPT mainline
Change-Id: I46cec4837528e1f3e66738e2d9ae85e3ea012f98

Motomu Utsumi   commited 2025-08-25 12:55:10 +09:00
aadd755e55
Merge changes from topic "vcn-code-move" into main
* changes:
  Remove unexpected OWNERS files and VcnUtils
  Move VCN code base to p/m/Connectivity with git history

Yan Yan   authored and   Android (Google) Code Review   commited 2025-08-22 16:16:06 -07:00
a759f8b01c
NetBpfLoad: use libbpf based on mainline beta flag
This CL did not change the binary and library size

Before this CL
"""
$adb shell ls -l /apex/com.android.tethering/bin/netbpfload
-rwxr-x--- 1 root root 102744 1970-01-01 09:00 /apex/com.android.tethering/bin/netbpfload
$adb shell ls -1 /apex/com.android.tethering/lib64 | wc -l
21
"""

After this CL
"""
$adb shell ls -l /apex/com.android.tethering/bin/netbpfload
-rwxr-x--- 1 root root 102744 1970-01-01 09:00 /apex/com.android.tethering/bin/netbpfload
$adb shell ls -1 /apex/com.android.tethering/lib64 | wc -l
21
"""

Flag: com.android.tethering.readonly.flags.use_libbpf
Bug: 428792764
Test: Enable/Disable flag, boot, adb shell logcat
Change-Id: Ie8d94ab00d8b32f5062265c6b9696feb77a0f0b1

Motomu Utsumi   commited 2025-08-22 22:46:24 +09:00
5a3103ba1e
Merge changes I105ee1d6,I55817132 into main
* changes:
  Update ENABLE_MATCH_NON_THREAD_LOCAL_NETWORKS flag to target sdk 37
  Adopt mainline beta program for local network agent

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-08-21 10:28:00 -07:00
14debeb714
Merge "Support IpAddress type in LocalNetAccessKey for BPF" into main
Sarup Dalwani   authored and   Android (Google) Code Review   commited 2025-08-21 09:53:36 -07:00
9e567923d4
Merge "Refactor IngressDiscardKey to support generic IP addresses" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-08-21 09:32:10 -07:00
09662addd6
Merge "Add a offloadInfo map to better manage offload info" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-08-21 01:54:29 -07:00
d50b9e40c6
Remove service-side TrafficStats rate limit cache
The service-side TrafficStats rate limit cache is no longer needed as
client-side caching is now solely responsible for rate-limiting traffic
stats queries.

This commit removes:
- The `clearTrafficStatsRateLimitCaches` AIDL method.
- The service-side cache implementation, including member variables and
  logic within `NetworkStatsService`.
- Related feature flags and constants used for the service-side cache.
- All unit tests specifically for the service-side cache.

This simplifies the overall traffic statistics caching architecture by
centralizing rate-limiting responsibility on the client side.

Flag: EXEMPT refactoring
Test: atest ConnectivityCoverageTests --test-filter '.*NetworkStats.*' --update-device
Test: atest ConnectivityCoverageTests --test-filter '.*TrafficStats.*' --update-device
Fix: 428098676
Fix: 428097311
Change-Id: I41cbb80a52f04dcf387c3352677a91cb692ffe73

Junyu Lai   commited 2025-08-21 16:47:27 +08:00
e9eb8e2b8a
Remove non-existent CtsNativeNetTestCases from TEST_MAPPING.
Bug: 397521796
Flag: EXEMPT TEST_ONLY
Test: test-only change
Change-Id: Id945d7d7f4c69414ea0942912b23fe8dd6cafc77

Lorenzo Colitti   commited 2025-08-20 19:31:29 -07:00
f01d65a7a7
Merge "Put the connectivity CTS tests into HSUM presubmit." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-08-20 19:24:11 -07:00
82209dc280
Remove automotive MUMD workaround in ApfIntegrationTest.
As per `Iad43a122407fe438cab94f59ed8aba8d6080af02` commit, this test is no longer running on automotive.

This changelist also skips this test on Android Automotive within the setupOnce (@BeforeClass) method to avoid
executing unnecessary SLEEP/WAKEUP logic.

Fix: 439953326
Test: atest CtsNetTestCases:ApfIntegrationTest
Test: presubmit
Flag: TEST_ONLY
Change-Id: Ic96db7a5dbc3f793bef85d9d3cd10cbcf726c7b4

Antonio Kantek   commited 2025-08-20 13:23:15 -07:00
84dabda01a
Merge "NetBpfLoad: expose kernel bug BPF map to NetworkStack" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-20 01:32:12 -07:00
cf94760d68
NetBpfLoad: expose kernel bug BPF map to NetworkStack
This change grants the NetworkStack process read access to the existing
'map_kernel_bugs' BPF map. This map, created by NetBpfLoad,
allows the kernel to signal known bugs to userspace.

The primary modification is applying the correct permissions
('chown'/'chmod') so the NetworkStack can query the map.

The map is pinned to `/sys/fs/bpf/tethering/map_kernel_bugs` and its
permissions are set (root:network_stack, 0640) for access by network_stack
```
$ adb shell ls -lZ /sys/fs/bpf/tethering/
total 0
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_kernel_bugs
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_dev_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_downstream4_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_downstream64_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_downstream6_map
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_error_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_limit_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_stats_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_upstream4_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_offload_tether_upstream6_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_test_bitmap
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_test_tether2_downstream6_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_test_tether3_downstream6_map
-rw-rw---- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 map_test_tether_downstream6_map
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_downstream4_ether
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_downstream4_rawip
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_downstream6_ether
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_downstream6_rawip
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_upstream4_ether
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_upstream4_rawip
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_upstream6_ether
-r--r----- 1 root network_stack u:object_r:fs_bpf_tethering:s0  0 2025-08-18 04:04 prog_offload_schedcls_tether_upstream6_rawip
```

Flag: EXEMPT mainline
Bug: 430428550
Test: Manually check `dumpsys tethering bpf` after using bpftool on the map
Change-Id: Ie0fdaeea85cc9de45a42fd15a714a49ec9f3049d

Jimi Chen   commited 2025-08-19 22:44:49 -07:00
579e85b8d1
Add a offloadInfo map to better manage offload info
Instead of iterating all listeners to get the FilterRepliesInfo,
this change introduces a new offloadInfo map to manage this
information. This map is updated when listeners are added/removed
or when a service is resolved. This ensures that the offload
information is always up-to-date and can be retrieved
efficiently.

Bug: 410734687
Test: atest ConnectivityCoverageTests
Flag: EXEMPT refactor
Change-Id: I89270c58304eec9fe9c3ed63dfbd46dab788a39f

Paul Hu   commited 2025-08-19 09:51:07 +00:00
1cf7a517fc
Update ENABLE_MATCH_NON_THREAD_LOCAL_NETWORKS flag to target sdk 37
The ENABLE_MATCH_NON_THREAD_LOCAL_NETWORKS compatibility flag is
now enabled for apps targeting SDK 37 or higher.

Previously, this flag was configured to enable for
Baklava (SDK 36) or higher. This is no-op because
there is no tethering network agent presents.

While the tethering network agents planned to be enabled in
25Q4, this adjustment allows developers sufficient time
to adapt to the behavior change where NetworkRequests
will match non-Thread local networks.

Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Test: atest ConnectivityCoverageTests --update-device \
      --test-filter '.*Connectivity.*'
Bug: 420590461
Change-Id: I105ee1d677c6beb12b4dccd109c01ef5ff2717d3

Junyu Lai   commited 2025-08-19 14:16:23 +08:00
1c513a6a6f
Adopt mainline beta program for local network agent
Unifies the `TETHERING_LOCAL_NETWORK_AGENT` and
`WIFIP2PGO_LOCAL_NETWORK_AGENT` legacy feature flags into a
single mainline beta aconfig flag:
`tethering_and_p2p_go_local_network_agent`.

This change simplifies the logic for enabling the `NetworkAgent`
for both standard tethering (global scope) and Wi-Fi P2P Group
Owner mode (local scope). The agent is now enabled for both use
cases when the new flag is on.

The implementation in `IpServer` and associated tests have
been updated to use the new unified flag.

Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Bug: 420590461
Test: atest TetheringTests
Test: adb root
      adb shell device_config put com_android_tethering com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent true
      adb reboot
      atest CtsTetheringTest --test-filter '.*Agent.*'
Test: atest ConnectivityCoverageTests:android.net.ip.IpServerTest --update-device
Change-Id: I55817132c57a04b4f7b7bac61b5741f45ba16182

Junyu Lai   commited 2025-08-19 14:16:23 +08:00
dc420ccccb
jni tests: set min_sdk_version=33
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I56e2154321d072a0786c41d3a46991db44708410

Maciej Żenczykowski   commited 2025-08-18 23:02:02 -07:00
e03d319f31
netd_updatable_unit_test: set min_sdk_version=33
netd_updatable was added during T mainline effort.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I095cbe3a8dc75a47fca9489965a0b922ede56a8e

Maciej Żenczykowski   commited 2025-08-18 15:59:14 -07:00
a11e26a539
Remove unexpected OWNERS files and VcnUtils
During VCN code move, git histories of OWNERS files and VcnUtils was
also moved to the VCN mainline code in the "git filter-repo" process.
Though it is unexpected, it is very hard to filter them out. Thus CL
is created to delete these files as a followup.

Bug: 430967429
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Flag: EXEMPT code move

Change-Id: I866b38eea1a8702d87c7fbb05e32213b3d96afa7

Yan Yan   commited 2025-08-18 22:29:16 +00:00
24f0412f82
libbpf_android_test: set min_sdk_version=30
Not clear what the true minimum for this should be...
30/R? 31/S? 33/T?

So let's just err on the side of 30/R for now.

Bug: 439218498
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iebc28671f0b6fb5b33bf943fcccb3c4f836a92e6

Maciej Żenczykowski   commited 2025-08-18 15:18:35 -07:00
e18a04463d
libnetworkstats_test: set min_sdk_version=33
Without a set min_sdk_version the tests are built for
tip-of-tree which implies a 5.10+ kernel which then
results in them failing when installed on pixel 4/5
test devices with 4.14/4.19 kernels.

(Not sure how this ever worked, that should in
theory always have been illegal... I guess we've
been lucky...)

Bug: 439093090
Bug: 439218498
Flag: EXEMPT mainline
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2b02d314f70f771cb4d29758fe5dfe557a664638

Maciej Żenczykowski   commited 2025-08-18 13:46:28 -07:00
e670a4c5a2
NetBpfLoad: disable BTF when BPF command fixup is needed.
Should fix observed failure on a Xiaomi S device with 4.19 kernel:
  I NetBpfLoad: NetBpfLoad v0.42 (/apex/com.android.tethering/bin/netbpfload) api:31/31 kver:413009d (64-on-aarch64) libbpf: v1.4 uid:1000 rc:10
  I NetBpfLoad: Tethering APEX version 360911260
  E NetBpfLoad: bpfGetNextMapId(final 15) returned 0 errno 2
  W NetBpfLoad: Enabling bpfCmdFixupIsNeeded.
  ...
  W NetBpfLoad: libbpf: BTF loading error: -2
  E NetBpfLoad: btf__load_into_kernel failed, errno: 2
  E NetBpfLoad: Failed to create maps: (ret=-2) in /apex/com.android.tethering/etc/bpf/mainline/offload.o
  E NetBpfLoad: Failed to load object: /apex/com.android.tethering/etc/bpf/mainline/offload.o, ret: No such file or directory
  E NetBpfLoad: === CRITICAL FAILURE LOADING BPF PROGRAMS ===

(errno 2 is ENOENT)

Bug: 438099891
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I07eea956fe6b862c68d3679dbd9eac81bec05e71

Maciej Żenczykowski   commited 2025-08-18 12:56:44 -07:00
6f3b412e9b
Put the connectivity CTS tests into HSUM presubmit.
Add to hsum-presubmit the same tests that we have in
tv-presubmit.

Bug: 397521796
Test: test-only change
Flag: EXEMPT TEST_ONLY
Change-Id: Iaa1dd6dca1147e3b5e9715a6c4cedf6ed71469b9

Lorenzo Colitti   commited 2025-08-18 18:43:21 +09:00
6ba072f67a
Refactor IngressDiscardKey to support generic IP addresses
Updated IngressDiscardKey to use Type.IpAddress for its BPF
destination address field (dstAddr) and java.net.InetAddress
for its corresponding Java field

Bug: 392509494
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Flag: EXEMPT refactor
Change-Id: I24b3087c3c7f2ea25afe0f78729e01a7504e13cb

Sarup Dalwani   commited 2025-08-17 04:30:02 +00:00
83548e6690
Support IpAddress type in LocalNetAccessKey for BPF
Updated LocalNetAccessKey to use Type.IpAddress for its
`remoteAddress` BPF field. This enables the BPF map to
store both IPv4 and IPv6 addresses for this key.

To ensure proper functionality with IPv6 addresses, a new
unit test, `testAddLocalNetAccessAfterV_withIPv6`, has been
added to BpfNetMapsTest.java. This test specifically
verifies adding and retrieving local network access rules
using an IPv6 remote address.

Bug: 392509494
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Flag: EXEMPT refactor
Change-Id: I005f4f2b778ca2d3a4e6578c1440162532f8d004

Sarup Dalwani   commited 2025-08-17 03:39:28 +00:00
ab9a3af782
Move VCN code base to p/m/Connectivity with git history
frameworks/base/packages/Vcn -> p/m/Connectivity/Vcn
frameworks/base/tests/vcn -> p/m/Connectivity/Vcn/tests/unit
cts/tests/tests/vcn/src/android/net/vcn/cts -> p/m/Connectivity/Vcn/tests/cts

Bug: 430967429
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Flag: EXEMPT code move
Change-Id: If92bc23d0af6217179c1f7ee0fbc84e19f16012a

Yan Yan   commited 2025-08-16 06:39:14 +00:00
0a2c369d35
NetBpfLoad: Update build constraints & comments.
Corrected the comment in Android.bp regarding the target SDK version. In NetBpfLoad.cpp, added specific handling for RiscV builds to account for its undefined minimum API level. Added an error to ensure NetBpfLoad is always compiled within an APEX. Clarified that `minSupportedKernelVer` must be 0 for APEX builds to enable runtime kernel version enforcement.

Bug: 438908493
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie3affbfd702ff1f6d5f2887b6f56ade0ed7fb5dd

Maciej Żenczykowski   commited 2025-08-15 14:58:10 -07:00
95e4958769
Merge "Reduce unecessary allocation churn in MdnsServiceTypeClient.processResponse" into main
Richard Uhler   authored and   Android (Google) Code Review   commited 2025-08-15 08:57:01 -07:00
50ee5cd590
Disable API level and kernel version static asserts for RISC-V.
(riscv isn't released, and thus is 10000)

Should fix:
  Broken build 13940537 on git_main-without-vendor on aosp_cf_riscv64_phone-aosp_current-userdebug

FAILED: ...
packages/modules/Connectivity/bpf/loader/NetBpfLoad.cpp:91:15: error: static assertion failed due to requirement '10000 == 30': NetBpfLoad must be compiled for 30/R
   91 | static_assert(__ANDROID_API__ == 30, "NetBpfLoad must be compiled for 30/R");
      |               ^~~~~~~~~~~~~~~~~~~~~
<built-in>:500:25: note: expanded from macro '__ANDROID_API__'
  500 | #define __ANDROID_API__ __ANDROID_MIN_SDK_VERSION__
      |                         ^
<built-in>:499:37: note: expanded from macro '__ANDROID_MIN_SDK_VERSION__'
  499 | #define __ANDROID_MIN_SDK_VERSION__ 10000
      |                                     ^
1 error generated.

Bug: 438908493
Test: TreeHugger
Flag: EXEMPT mainline & compile fix for unreleased RiscV
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I50ba1c3159c277fb8becb68220ba0885cf30e996

Maciej Żenczykowski   commited 2025-08-15 05:30:23 -07:00
8c3023ad3b
Merge "KernelUtils: automatically assume 5.10 kernel on platform" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-15 01:01:13 -07:00
56b743dfb4
Merge "BpfNetworkStats: switch final iterate(f(K)) to forAll(f(K))" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-15 00:59:52 -07:00
588764ab38
Merge changes I40b29d98,I6b498579 into main
* changes:
  BpfNetworkStats: use bulk api on 5.10+
  BpfMap.h: on 5.10+ use bulk bpf map api

Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-15 00:53:05 -07:00
80ee0dbbcf
Merge "BpfSyscallWrappers: add helpers for BPF_MAP_LOOKUP{,_AND_DELETE}_BATCH" into main
Maciej Żenczykowski   authored and   Android (Google) Code Review   commited 2025-08-15 00:42:03 -07:00
2445570543