On Mon, Sep 16, 2024 at 02:19:21AM -0700, Eduard Zingerman wrote: > For kfuncs marked with KF_FASTCALL flag generate the following pair of > decl tags: > > $ bpftool btf dump file vmlinux > ... > [A] FUNC 'bpf_rdonly_cast' type_id=... > ... > [B] DECL_TAG 'bpf_kfunc' type_id=A component_idx=-1 > [C] DECL_TAG 'bpf_fastcall' type_id=A component_idx=-1 While testing slab cache BPF iterators I noticed: ⬢ [acme@toolbox perf-tools-next]$ pahole bpf_iter__kmem_cache WARNING: still unsuported BTF_KIND_DECL_TAG(bpf_fastcall) for bpf_cast_to_kern_ctx already with attribute (bpf_kfunc), ignoring WARNING: still unsuported BTF_KIND_DECL_TAG(bpf_fastcall) for bpf_rdonly_cast already with attribute (bpf_kfunc), ignoring struct bpf_iter__kmem_cache { union { struct bpf_iter_meta * meta; /* 0 8 */ }; /* 0 8 */ union { struct kmem_cache * s; /* 8 8 */ }; /* 8 8 */ /* size: 16, cachelines: 1, members: 2 */ /* last cacheline: 16 bytes */ }; ⬢ [acme@toolbox perf-tools-next]$ Next time adding a feature in the BTF encoder, please consider adding the support for the BTF loader and the pretty printer, so that we can capture that info and produce compileable output that has those tags. I'll do it when I get some free time. - Arnaldo