Commit graph

13 commits

Author SHA1 Message Date
Yi Kong
cb8e0a08ea Fix sign-compare warning
system/bpf/bpfloader/BpfLoader.cpp:79:23: error: comparison of integers of different signs: 'int' and 'std::__1::vector<android::bpf::BpfMapInfo, std::__1::allocator<android::bpf::BpfMapInfo> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
    for (int i = 0; i < mapPatterns.size(); i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~`

Test: m checkbuild
Change-Id: If2891bfc7655aea34499975763f72e0a25b32289
2018-12-14 14:31:42 -08:00
Elliott Hughes
fc3c7690fe C++17 is the default now.
Test: builds
Change-Id: Ieb3cf0a0c035e1b2fcea4a5e80bb0c1df473349f
2018-12-03 09:36:31 -08:00
Chenbo Feng
1f20ad3d78 Code style clean up
Apply the git clang format on the bpf project to make sure the existing
code compliance with the standard.

Test: project compiles and bpfMapTest pass.
Bug: 112334572
Change-Id: I4774aa2a197be2c671f6fb307c1fc9b71edfeeec
2018-11-28 11:31:36 -08:00
Chenbo Feng
249e2f869e Skip the bpf native tests on old devices
For older devices that doesn't have bpf support, skip the bpf native
tests so we don't get false alarms. Fixed some compiler warning and
added the clang-format check.

Test: ./libnetdbpf_test/libnetdbpf_test
Bug: 119526856
Change-Id: Icb73a8ee9b9dff9a0da28b96578e1245f1f3724f
2018-11-21 12:11:55 -08:00
Chenbo Feng
79a4da2d1e 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
2018-11-08 11:32:31 -08:00
Bernie Innocenti
b2515ff7ce Disable noisy clang-tidy warning for int and long types
These are hard to avoid when working with POSIX APIs:

  warning: consider replacing 'unsigned int' with 'uint32' [google-runtime-int]

Change-Id: I30047ff05ff680a9337671368e6b82ba88244f79
2018-10-25 22:12:07 +09:00
Treehugger Robot
5f35d9993f Merge "Add missing #include for ALOGx() macros" 2018-10-19 09:25:25 +00:00
Bernie Innocenti
26ffded7e2 Add missing #include for ALOGx() macros
Also remove some dead includes.

Test: atest libbpf_test
Change-Id: I89ae55377139f9db992451939a97657d04bd1cb5
2018-10-19 15:51:02 +09:00
Chenbo Feng
46662c8d38 Fix the build problem with bpf project
am: 4c9e9ecc57

Change-Id: I581717a4feed0a62bcb903945a777969dcd777e6
2018-10-17 13:55:50 -07:00
Chenbo Feng
3483f98c41 Initial checkin for bpf project
am: 75b410bdf1

Change-Id: Ie1b14f24f4231b506b31e6e7015ad4255db2400c
2018-10-17 13:47:36 -07:00
Chenbo Feng
4c9e9ecc57 Fix the build problem with bpf project
Add the necessary Android.bp file and fix the compile error for the new
bpf project.

Fix the run time restart false alarm in bpf loader.

Bug: 112334572

Test: device boot and dumpsys netd show eBPF object okay, runtime
      restart netd and no bpfloader error showed in logcat.
Change-Id: Iae193bda45e50b7d22479086d6403e3c4fb185c4
2018-10-16 21:17:12 -07:00
Chenbo Feng
75b410bdf1 Initial checkin for bpf project
Copied the files from system/netd into system/bpf. No modification is
made to the files.

Test: this doesn't build since the Android.bp file is missing
Bug: 112334572

Change-Id: Ia090a429dd416e07c46766784fb3dd2037201525
2018-10-16 20:38:03 -07:00
Inna Palant
3d00fed6eb Initial empty repository 2018-10-04 09:00:26 -07:00