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@xxxxxxxxxx> --- include/uapi/linux/btf.h | 7 +++++++ tools/include/uapi/linux/btf.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h index ec1798b..68628e9 100644 --- a/include/uapi/linux/btf.h +++ b/include/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__ */ diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/linux/btf.h index ec1798b..68628e9 100644 --- a/tools/include/uapi/linux/btf.h +++ b/tools/include/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__ */ -- 1.8.3.1