Rename DEFINE_BPF_RINGBUF to DEFINE_BPF_RINGBUF_EXT
_EXT suffix is used for the all-args versions of these, such as the one
here.
Bug: 246985031
Test: build and flash on 4.19 and 5.10
Change-Id: Ibd76cbdc38f4d1f9df4f440147e5f18d9a2ea026
diff --git a/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h b/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h
index ea56593..4d48720 100644
--- a/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h
+++ b/staticlibs/native/bpf_headers/include/bpf/bpf_helpers.h
@@ -182,21 +182,21 @@
// accessing the ring buffer should set a program level min_kver >= 5.8.
// * The definition below sets a map min_kver of 5.8 which requires targeting
// a BPFLOADER_MIN_VER >= BPFLOADER_S_VERSION.
-#define DEFINE_BPF_RINGBUF(the_map, ValueType, size_bytes, usr, grp, md, \
- selinux, pindir, share) \
- DEFINE_BPF_MAP_BASE(the_map, RINGBUF, 0, 0, size_bytes, usr, grp, md, \
- selinux, pindir, share, KVER(5, 8, 0), KVER_INF); \
- static inline __always_inline __unused int bpf_##the_map##_output( \
- const ValueType* v) { \
- return bpf_ringbuf_output_unsafe(&the_map, v, sizeof(*v), 0); \
- } \
- static inline __always_inline __unused \
- ValueType* bpf_##the_map##_reserve() { \
- return bpf_ringbuf_reserve_unsafe(&the_map, sizeof(ValueType), 0); \
- } \
- static inline __always_inline __unused void bpf_##the_map##_submit( \
- const ValueType* v) { \
- bpf_ringbuf_submit_unsafe(v, 0); \
+#define DEFINE_BPF_RINGBUF_EXT(the_map, ValueType, size_bytes, usr, grp, md, \
+ selinux, pindir, share) \
+ DEFINE_BPF_MAP_BASE(the_map, RINGBUF, 0, 0, size_bytes, usr, grp, md, \
+ selinux, pindir, share, KVER(5, 8, 0), KVER_INF); \
+ static inline __always_inline __unused int bpf_##the_map##_output( \
+ const ValueType* v) { \
+ return bpf_ringbuf_output_unsafe(&the_map, v, sizeof(*v), 0); \
+ } \
+ static inline __always_inline __unused \
+ ValueType* bpf_##the_map##_reserve() { \
+ return bpf_ringbuf_reserve_unsafe(&the_map, sizeof(ValueType), 0); \
+ } \
+ static inline __always_inline __unused void bpf_##the_map##_submit( \
+ const ValueType* v) { \
+ bpf_ringbuf_submit_unsafe(v, 0); \
}
/* There exist buggy kernels with pre-T OS, that due to