Correct the indentation style of libclat in the follows
bpf_headers/Android.bp
bpf_syscall_wrappers/Android.bp
Test: build
Change-Id: I7cdd354141124fa8f7b4a864ddd937bef4676302
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
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
* 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
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
Add tests for isEthernet(). Before I can add tests for the other
functions, I need to move tcQdiscAddDevClsact into libtcutils.
Bug: 202086915
Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: Id51e87bb76bc42a055f71027c94c51fcb76be209
Needed because ClatdController and clatd binary are moved
into apex. libclat is used for accessing BPF map.
Bug: 212345928
Test: manual test
1. Connect to ipv6-only wifi.
2. Try IPv4 traffic.
$ ping 8.8.8.8
Change-Id: If3fb00e12ef365ccf3ac782c4e6ecbfd01d2dd4c
Needed because ClatdController and clatd binary are moved
into apex. libclat is used for accessing BPF map.
Bug: 212345928
Test: manual test
1. Connect to ipv6-only wifi.
2. Try IPv4 traffic.
$ ping 8.8.8.8
Change-Id: I95a1c21927ba95f6094152e1013761d79c73e981
The CtsNativeNetPlatformTestCases uses BpfUtils.h in bpf_headers.
Bug: 29761778
Bug: 202086915
Test: atest CtsNativeNetPlatformTestCases on signed user build
Change-Id: Ibbb10392a283b88328ae17d9aa54322f50878e76
Move kernelVersion and isAtLeastKernelVersion to a local kernelversion.h,
since we cannot use bpf_headers' version of BpfUtils.
Bug: 202086915
Bug: 157552970
Test: builds
Change-Id: I83149b76cc5125991bdb52ce6160c497eb52b48b
This CL is copying the "generic" parts of BpfUtils to
frameworks/libs/net/common. "Generic" meaning the parts that will be
used by both TcUtils in frameworks/libs/net/common and netd.
Bug: 202086915
Bug: 157552970
Test: atest TetheringTests
Change-Id: I9e780fc22e30d046f44953a8cac7687cb6c721c7
Prepare to package libclat library and clatd binary into tethering
apex. This library is required.
Bug: 212345928
Test: build
Change-Id: I768c6358d9f4f15b37f73b3cfe2ff54a095a1bca
BPF headers used by both platform and mainline modules should be in
frameworks/libs/net.
Bug: 202086915
Test: build and boot
Test: cd packages/modules/Connectivity/netd; atest
Change-Id: Ie6f257b022cdea6bab3389a9fa41791f893e54c3
This code is used by the DNS resolver mainline module, so it
should be in a directory that is automerged to sc-mainline-prod,
not in /system/core.
Test: m
Change-Id: I2d953afa3d2766ca2b4529e9e49151c098b466aa
Added SPDX-license-identifier-Apache-2.0 to:
common/native/bpf_map_utils/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Change-Id: I4f254c63df574bcce60aa5854107fccbb888f424
retrieveProgram() in bpf_syscall_wrappers is used by libnetd_mainline.
Bug: 202086915
Test: m; flash; boot
Change-Id: I69573a6925fd9f5fcd65935d681e7a340ee73f17
1. Move BPF map definition and utilities to a common place that easy to
be referenced from both mainline module and platform code.
2. Create cc_library_headers bpf_map_utils which includes BPF map
definition and utils.
Bug: 202086915
Test: m; flash; boot
Test: cd system/netd/ && atest
Test: cd packages/modules/Connectivity && atest
Test: m gpuservice_unittest libtimeinstate_test bpf_module_test
CtsAppOpsTestCases libbpf_load_test VtsBootconfigTest
vts_test_binary_bpf_module bpf_benchmark libbpf_load_test
libbpf_android_test
Change-Id: I4d54b0d69029f593b8da3099d7ae16279692dabd
The FUSE daemon in MediaProvider needs to access the file descriptor of
its pinned BPF program.
The BPF syscall wrappers are handy and would avoid code duplication,
thus extend this project visibility to MediaProvider.
Bug: 202785178
Test: adb logcat FuseDaemon:V \*:S (in git_master)
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I406c760bb96d74597ca7d8f701cd12c3bd318f68
1. Separate bpf and struct libraries from netlink library.
2. Rename bpfmap jni library to respect its java side library.
3. Add README to explain the rules of adding shared jni library.
4. Also allow packages/modules/Connectivity to use bpf library.
Bug: 205088391
Test: atest TetheringTests
atest CtsTetheringTest
atest TetheringPrivilegedTests
atest ConnectivityCoverageTests
Change-Id: I6e668818bede63b241cd901c0967f401613ddaf6
Multiple packages need access to bpf maps. Moving to common
location to allow access from all necessary packages.
Test: atest BpfMapTest
Bug: 179733303
Change-Id: Idae7b620c15c781b2e7980c3a3157f396cfaf66e
Export BPF headers to connectivity service for use with
VendorConnectivityService aidl.
Bug: 179733303
Change-Id: Ibc098facde54aeb621e53b73ac59eb6416ba9ebb
LMKD needs access to map_gpu_mem_gpu_mem_total_map
BPF map to record the total size of GPU allocations
at the time of a kill. Change bpf_syscall_wrappers
visibility to allow lmkd to use bpf_syscall_wrappers
library.
Bug: 189366037
Test: lmkd_unit_test
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia1f75852a853f62b504351271119714f3fd95232
(there's bpf related stuff in here)
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7fcc19cdf48e468dfcbe5ee34f7bc07e261756b8
This isn't new code, this is basically copied verbatim from
//system/bpf/libbpf_android/include/bpf/BpfUtils.h
Test: atest BpfMapTest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I80523c9ee0c1e4431f3192eb409ad68c737390a6