Commit Graph

16 Commits

Author SHA1 Message Date
Stephane Lee
4806feb3a5 Allow use of shared bpf headers by recovery
This will allow healthd to filter uevent packets, if needed

Bug: 203462310
Test: Ensure that healthd can build if it uses bpf filters
Change-Id: I97bfe9509a6934444f656508176495bba38381be
2022-03-09 14:16:41 -08:00
Ken Chen
0a31b342a1 BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros
patch the missing commit I3acb47a432378f257418f81b26516e18d6ff3780.

Test: TreeHugger, atest libbpf_android_test netd_unit_test
netd_integration_test

Change-Id: I6b7114584759c0689e0d6b852387b93a799f663f
2022-03-02 03:19:49 +00:00
Maciej Żenczykowski
c805004f6d switch from libbpf_android to bpf_headers
Test: TreeHugger, atest libbpf_android_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I215ac3c5d4820bfef94a48024d511ea86012eb0f
2022-02-09 19:33:20 -08:00
Maciej Żenczykowski
6b1d684059 bpf_headers/bpf_syscall_wrappers - remove visibility restrictions
this doesn't appear to make sense now that it's available to vendors

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If2d24fa8eccfb5c12832fb191a8560b024751db7
2022-02-09 19:33:20 -08:00
Steven Moreland
b0df1895d5 bpf_headers for vendor.
For waitForProgsLoaded.

Bug: 162057235
Test: build, load bpf program from vendor
Change-Id: Ib670aada0a98249fed21beb72879326286b2f4c2
2022-02-08 22:30:07 +00:00
Hungming Chen
51fecf19e2 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
2022-01-25 20:09:09 +08:00
Maciej Żenczykowski
ba9eeabd14 Merge "Add BPF_ANNOTATE_KV_PAIR to BPF map definition macros" 2022-01-25 02:31:59 +00:00
Maciej Żenczykowski
4772d859a7 Merge changes from topic "configure_bpf_for_clat"
* changes:
  make bpf_headers visible to libclat
  make bpf_syscall_wrappers visible to libclat
2022-01-24 19:14:35 +00:00
Ken Chen
945c8b2638 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
2022-01-23 15:57:25 +08:00
Connor O'Brien
56875455c2 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
2022-01-20 21:22:24 -08:00
Hungming Chen
cd3f28f35d make bpf_headers visible to libclat
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
2022-01-16 13:52:45 +08:00
Ken Chen
a973c0be7d Add bpf_headers visibility for CtsNativeNetPlatformTestCases
The CtsNativeNetPlatformTestCases uses BpfUtils.h in bpf_headers.

Bug: 29761778
Bug: 202086915
Test: atest CtsNativeNetPlatformTestCases on signed user build
Change-Id: Ibbb10392a283b88328ae17d9aa54322f50878e76
2022-01-15 02:27:22 +08:00
Wayne Ma
67a69e7396 [NETD-TC#12] Fix dependency on libtraffic_controller
1. Add visibility for libtraffic_control
2. Add com.android.tethering into apex_available statement

Bug: 202086915
Test: m; flash; boot
Change-Id: I817e22c24dd205f09ef62a2a7ff85b2a970f6d3a
2022-01-14 12:24:13 +08:00
Maciej Żenczykowski
15d8ebee41 bpf_connectivity_headers -> bpf_headers -> bpf_syscall_wrappers
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idf158fa33670522b43e34c67a77087648b8b97a4
2021-12-28 17:56:27 -08:00
Ken Chen
45c7b15553 [NETD-BPF#23] Move a few headers to frameworks/libs/net
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
2021-12-23 09:57:29 +08:00
Ken Chen
0f1ee4ca81 Rename bpf_map_utils to bpf_headers
Use a generic name so that it can contain more bpf related headers.

Bug: 202086915
Test: build
Change-Id: I5a76948db394d8d7bb6eaedb570a2ca5bc99a289
2021-12-21 16:16:20 +08:00