(makes room for 25q2+ sdksandbox localhost restrictions,
without increasing program complexity and thus bpf verifier
run time on older devices)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia2bbd089467459754c4f6eabd90a3ea51cec6b98
Maciej Żenczykowskicommited 2025-01-21 19:37:06 -08:00
The existing '4_14' is *wrong* as these programs are present
and successfully loaded on 4.9 T devices.
However, it is just a name and thus doesn't actually matter.
Changing SDK_LEVEL_NONE to SDK_LEVEL_T is a no-op, since netd.c
was only mainlined starting with Android T.
(the entire mainline provided netd.o isn't loaded by pre-T bpfloader)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I83df3ce9eee72d4f67643084ebf56fb316e2a21e
Maciej Żenczykowskicommited 2025-01-21 19:12:05 -08:00
(TRACE_ON is now simply KVER >= 5.10)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I62e69c0841754a44e4ec33800709eda1e7d421d4
Maciej Żenczykowskicommited 2025-01-21 17:53:00 -08:00
(for simplification, more uses in coming commits)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie660ab98d2326d9eec6b5032c449ea5bf715a9b0
Maciej Żenczykowskicommited 2025-01-21 16:40:20 -08:00
(no other value makes sense anyway)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If1066f10a62d650b0f1fef4b0103288a53b48a2a
Maciej Żenczykowskicommited 2025-01-21 16:38:44 -08:00
(no other value makes sense anyway)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4a3d0a279d2abe50bb8353267b951c02fd49d5af
Maciej Żenczykowskicommited 2025-01-21 16:38:23 -08:00
(no other value makes sense anyway)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I032c8d9355fd18f1d656eb6b0c2942b965bbab2c
Maciej Żenczykowskicommited 2025-01-21 16:38:10 -08:00
(no other value makes sense anyway)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9efd5ea3919310b10d28c1d14f1e050a2ab0d689
Maciej Żenczykowskicommited 2025-01-21 16:37:19 -08:00
These used to be attached from system server, but this is no
longer the case. They are now attached from netd updatable
(ie. from within netd)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idc2d0351dc76e0b751e2910ca58c0ef313e72a88
Maciej Żenczykowskicommited 2025-01-21 16:37:01 -08:00
5.9 is not LTS, and thus isn't supported.
Let's simplify to 5.10 which is the actual LTS supported version.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5595abaacb9b479d82787dc021b0e3109a49951d
Maciej Żenczykowskicommited 2025-01-21 15:01:04 -08:00
Neither 5.8 nor 5.9 are LTS, and thus aren't supported.
Let's simplify to 5.10 which is the actual LTS supported version.
Generated via:
sed -i -r 's/KVER_5_8/KVER_5_10/' bpf/progs/offload.c
sed -i -r 's/KVER_5_8/KVER_5_10/' bpf/progs/netd.c
plus manual edit to:
bpf/headers/include/bpf_helpers.h
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2b9563e1a392011718d3f7d788f84201993e58c2
Maciej Żenczykowskicommited 2025-01-21 15:00:53 -08:00
This will allow build time compiling versions of an ebpf program
with sdk level specific behaviour.
The mainline bpfloader already supports loading programs
based on the sdk level, so this builds on that.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I97078c6bdf4cef143cdfeed6ea8e2594bd1f5cd6
Maciej Żenczykowskicommited 2025-01-21 14:21:01 -08:00
This behaviour we depend on continues to be present...
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I785e908700182734ef7cc21c7c2741c327f7a18b
Maciej Żenczykowskicommited 2025-01-21 12:33:10 -08:00
We have been seeing frequent EAGAIN errors during i/o operations in
tests. This change increases the timeout by 10x to hopefully minimize
these failures.
Per maze@: these methods are dependent on rcu synchronization, which
can take a long time on a busy system. Blocking the thread is
most likely always preferable over failing the operation.
Bug: 390722214
Test: TH
Change-Id: I96aa5a583c0c7558a8ea945eca5e5cb8f1c35c69
Add TetheringRequest#RequestType to distinguish the type of
TetheringRequest (i.e. from startTethering, from implicit broadcasts, or
from the legacy tether API) as well as helper methods to create these
requests. These will be used in a future CL.
Bug: 216524590
Test: build
Change-Id: Ibfda48f59e80d423c9b6ee0d244cbdab14be1bd2
Quang Anh Luongcommited 2025-01-21 17:48:38 +09:00
Kernel requires maps of type BPF_MAP_TYPE_LPM_TRIE to not be
preallocated, so default enable the flag for these.
But even for non LPM_TRIE maps allow a negative num_entries
value to ask for 'non preallocated' maps.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I48d5d5813628c87094c5efa7266b0354b135dd7e
Maciej Żenczykowskicommited 2025-01-20 14:49:44 -08:00
This reverts commit dcb2e7496c.
Reason for revert: will use negative size to imply no prealloc instead.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If1ce59acc592435537bce1d61857ba964bf8b6e6
Maciej Żenczykowskicommited 2025-01-20 12:10:04 -08:00
This will allow BPF maps to be created with flag options that are
supported e.g BPF_F_NO_PREALLOC, BPF_F_MMAPABLE and others.
Bug: 387984935
Test: Modified NetBpfLoader to dump the map flags.
Change-Id: Ia13ca5a861e8275e831c2b96f4759d1e8f111963
Some tests use CarrierConfigManager#overrideConfig(subId, bundle) to set
some configs, and then overrideConfig(subId, null) to reset the
override. However this also resets overrides that may have been set by
the instrumentation, such as ConnectivityTestTargetPreparer /
CarrierConfigSetupTest.
Avoid this by providing a common utility to set and tear down carrier
config, which reset the overrides to the original setting value instead
of clearing all overrides.
Test: atest
Bug: 253698734
Change-Id: Ia25b28d551b62205c52f91e0ffad1b94710c0828
This change updates the testReplyPing() method in ApfIntegrationTest to
send multiple packets for each received packet. This verifies the VSR-16
requirement that mandates firmware support for multiple
apf_allocate_buffer() calls within a single APF interpreter run, as long
as sufficient RAM is available.
Test: atest CtsNetTestCases:android.net.cts.ApfIntegrationTest
Change-Id: Ibe4a6babd555e4269ab3e98deecb6824610376f3
Jimi Chenauthored and Yuyang Huangcommited 2025-01-17 22:25:34 +09:00
Several extra callbacks are sent after the first timer expiration
notification. This occurs because data from the FileDescriptor
must be read after the timer expires. Otherwise, expiration
callbacks will continue to be sent, notifying of unread data.
This change also adds TFD_NONBLOCK to timerfd creation to ensure
reading safety.
Test: Manually verify that the callback is sent only once
Change-Id: I30559ed93d0a742b98a58d33d83723f7a155fbd9
This change adds missing dependancies of CtsNetTestCases to the automotive-general-tests zip
Change-Id: Iba2da89b380214ad785d504a484b0b72b508814d
BUG: 382649664
Flag: TEST_ONLY
Filip Zakrzewskicommited 2025-01-16 15:25:33 -08:00