Commit graph android_system_bpf/libbpf_android/Android.bp
Message SHA1
libbpf_android: remove libnetdutils dep
Remove libnetdutils dependency because bpf is being used for things other
than networking these days, and we don't want to make libnetdutils
vendor-available in the future. libbase provides an alternative type now.

Bug: 140330870
Test: atest libbpf_android_test netd_integration_test netd_unit_test
    libnetdbpf_test bpf_module_test
Change-Id: I72ae8cd7f58a49bfc7dcb914a332a4c4bad5dea5

Steven Moreland   commited 2020-01-21 10:47:33 -08:00
e7cd2a72d0
TEST_MAPPING += libbpf_android_test
Note, this does not add libbpf_load_test as well because this test
requires adding a bpf program to the system image.

Bug: N/A
Test: `atest --test-mapping .`
Change-Id: I770ec4876e1cb93a526e99bcb5a234f964f46971

Steven Moreland   authored and   Maciej Żenczykowski   commited 2020-01-15 08:28:44 +00:00
b572378120
Merge "libbpf_load_test: fix map location"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2020-01-15 02:29:18 +00:00
0cb8b5ca7a
libbpf_load_test: fix map location
This test had bitrot.

Bug: N/A
Test: `atest libbpf_load_test`
Change-Id: I3480286e225d8dfbd0badd7bbb7cb77ff29ab0ea

Steven Moreland   commited 2020-01-14 11:37:49 -08:00
cdeb9203af
libbpf_android: waitForProgsLoaded
Creating a function for this rather than having people copy/paste a loop
there.

It's very intentional that there is no timeout here. If bpfloader is
down, there is a serious problem, and we shouldn't let code move forward
in a state where it may not have been tested.

Bug: 140330870
Test: boot & use bpf/netd
Change-Id: I358d1fcf77ad5406e294dd57307bc411e2c8ad6a

Steven Moreland   commited 2020-01-10 15:37:53 -08:00
4891e61341
libbpf_android_test - add 'require_root: true'
Bug: 141272654
Bug: 141307514
Test: now passes
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I29f89838743aa4bab3bf7cc643891e33da5fffdf

Maciej Żenczykowski   commited 2019-09-19 14:41:56 -07:00
1a4659c1ba
Revert "libprocessgroup users use libcutils"
This reverts commit f0336cb586.

Reason for revert: breaks all camera use cases

Bug: 135568875

Exempt-From-Owner-Approval: revert, no build cop

Change-Id: Ie228b8dd167d4788c3cf570d0ff531e88a06a170

Zhijun He   authored and   Steven Moreland   commited 2019-06-19 04:50:36 +00:00
855cf18f8b
libprocessgroup users use libcutils
libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Bug: 135145426
Test: boot
Change-Id: Ie268ddbdb5a8b2eb254c956c8262aed8405752fa

Steven Moreland   commited 2019-06-18 16:25:28 +00:00
f0336cb586
Add tests for BPF loader
Bug: 112334572
Change-Id: I4457ee9ea3044c5c9ecb6ebfd5ad4f5a2c11dce5
Signed-off-by: Joel Fernandes <joelaf@google.com>

Joel Fernandes   commited 2019-02-04 15:28:52 -05:00
4845288a6e
Remove hardcoded cgroup v2 path
Replace hardcoded cgroup v2 root path with new libprocessgroup API calls.

Bug: 111307099
Test: builds, boots

Change-Id: Ic9c47b52702767f9934f65d04bb91ab303b1d06e
Merged-In: Ic9c47b52702767f9934f65d04bb91ab303b1d06e
Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Suren Baghdasaryan   commited 2019-02-02 16:58:40 +00:00
9217ccba51
Initial checkin for relocatable ELF loader and link with bcc
* Wrote a relocatable ELF loader from scratch. The loader library loads
all objects in /system/etc/bpf/, parses and fixes up eBPF instructions
based on relocation information, creates maps and programs and pins
them. A single API call without arguments is made which results in this
operation. The API has all the information it needs from the filesystem
and the ELF objects, so there is no configuration stored in the code
calling the loader API essentially making it zero conf. Initially this
will be used by time_in_state statistics collection using tracepoints.
In the future, netd's eBPF C code should be rewritten to use this
infrastructure and the old ELF loader can be gotten rid off. This is the
first step.

* Link libbpf with libbpf_android which will come from the external/ bcc
project. This will be used for tracepoint and perf eBPF support. In the
future it can be used for other things as kernel eBPF support advances.

This patch will be merged only after bcc is cloned into external/ to
prevent build breakage.

Bug: 112334572
Change-Id: Ic0fd9504e18031132d40bb627c5e44058d59c9f8
Signed-off-by: Joel Fernandes <joelaf@google.com>

Joel Fernandes   commited 2018-12-17 22:27:56 +00:00
d76a2004a6
Rename libbpf to libbpf_android
Rename the bpf support library in android to libbpf_android to make
it compatible with external bcc project. Fix the Android.bp file to
prevent build break.

Bug: 112334572
Test: No build breakage.
Change-Id: I24ae8aaf8ca8afdded5e46d21f0deec68d6030da

Chenbo Feng   commited 2018-11-08 11:32:31 -08:00
79a4da2d1e
Renamed from libbpf/Android.bp (Browse further)