How to extract BTF object ID from kernel module?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrii,

When opening a modules BTF file (e.g. /sys/kernel/btf/i40e), can I
somehow get the kernels BTF object ID value (via that FD)?

I think I want the BTF object IDs as displayed by 'btftool btf'.
That code walks all IDs via bpf_btf_get_next_id() and then gets the FD
via bpf_btf_get_fd_by_id().  I'm looking for a more direct way than
having to walk all IDs...

(p.s. Cc. Larysa, I also looked at your code, which like bpftool end-up
walking all BTF IDs and extends libbpf with internal btf_obj_id to keep
track).

--Jesper




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux