@@ -197,4 +197,11 @@ struct btf_enum64 {
__u32 val_hi32;
};
+/* Prefixes used for names encoding BTF kind information via structs;
+ * a "struct __BTF_KIND_ARRAY" represents how BTF_KIND_ARRAY is encoded,
+ * while a "struct __BTF_KIND_META_ARRAY" represents the metadata encoding.
+ */
+#define BTF_KIND_PFX "__BTF_KIND_"
+#define BTF_KIND_META_PFX "__BTF_KIND_META_"
+
#endif /* _UAPI__LINUX_BTF_H__ */
@@ -197,4 +197,11 @@ struct btf_enum64 {
__u32 val_hi32;
};
+/* Prefixes used for names encoding BTF kind information via structs;
+ * a "struct __BTF_KIND_ARRAY" represents how BTF_KIND_ARRAY is encoded,
+ * while a "struct __BTF_KIND_META_ARRAY" represents the metadata encoding.
+ */
+#define BTF_KIND_PFX "__BTF_KIND_"
+#define BTF_KIND_META_PFX "__BTF_KIND_META_"
+
#endif /* _UAPI__LINUX_BTF_H__ */
This allows us to share them with kernel and userspace so that both libbpf and the kernel can parse BTF kind information. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> --- include/uapi/linux/btf.h | 7 +++++++ tools/include/uapi/linux/btf.h | 7 +++++++ 2 files changed, 14 insertions(+)