Commit graph

5 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
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
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
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