Merge "remove spurious #include and OVERFLOW_COUNTERSET"
diff --git a/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h b/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h
index 8906816..28d4b8b 100644
--- a/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h
+++ b/staticlibs/native/bpf_headers/include/bpf/BpfUtils.h
@@ -106,22 +106,5 @@
return kernelVersion() >= KVER(major, minor, sub);
}
-#define SKIP_IF_BPF_NOT_SUPPORTED \
- do { \
- if (!android::bpf::isAtLeastKernelVersion(4, 9, 0)) \
- GTEST_SKIP() << "Skip: bpf is not supported."; \
- } while (0)
-
-// Only used by tm-mainline-prod's system/netd/tests/bpf_base_test.cpp
-// but platform and platform tests aren't expected to build/work in tm-mainline-prod
-// so we can just trivialize this
-#define SKIP_IF_EXTENDED_BPF_NOT_SUPPORTED
-
-#define SKIP_IF_XDP_NOT_SUPPORTED \
- do { \
- if (!android::bpf::isAtLeastKernelVersion(5, 9, 0)) \
- GTEST_SKIP() << "Skip: xdp not supported."; \
- } while (0)
-
} // namespace bpf
} // namespace android
diff --git a/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h b/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h
index 02caf07..f17cf3a 100644
--- a/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h
+++ b/staticlibs/native/bpf_headers/include/bpf/bpf_map_def.h
@@ -174,7 +174,14 @@
char pin_subdir[BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE];
bool shared; // use empty string as 'file' component of pin path - allows cross .o map sharing
- char pad0[3]; // manually pad up to 4 byte alignment, may be used for extensions in the future
+
+ // The following 3 ignore_on_* fields were added in version 0.32 (U). These are ignored in
+ // older bpfloader versions, and zero in programs compiled before 0.32.
+ bool ignore_on_eng:1;
+ bool ignore_on_user:1;
+ bool ignore_on_userdebug:1;
+
+ char pad0[2]; // manually pad up to 4 byte alignment, may be used for extensions in the future
unsigned int uid; // uid_t
};
@@ -196,7 +203,14 @@
unsigned int max_kver;
bool optional; // program section (ie. function) may fail to load, continue onto next func.
- char pad0[3];
+
+ // The following 3 ignore_on_* fields were added in version 0.32 (U). These are ignored in
+ // older bpfloader versions, and zero in programs compiled before 0.32.
+ bool ignore_on_eng:1;
+ bool ignore_on_user:1;
+ bool ignore_on_userdebug:1;
+
+ char pad0[2]; // manually pad up to 4 byte alignment, may be used for extensions in the future
// The following fields were added in version 0.1
unsigned int bpfloader_min_ver; // if missing, defaults to 0, ie. v0.0