History

bpf: pass btf object id in bpf_map_info.

Include btf object id (btf_obj_id) in bpf_map_info so that tools (ex: bpftools struct_ops dump) know the correct btf from the kernel to look up type information of struct_ops types. Since struct_ops types can be defined and registered in a module. The type information of a struct_ops type are defined in the btf of the module defining it. The userspace tools need to know which btf is for the module defining a struct_ops type.

Kui-Feng Lee committed 2 years ago

Commit 1338b931 parent 47f4f655 files · +15 −2Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/bpf.h+1−1
@@ -6487,7 +6487,7 @@ struct bpf_map_info { · 6486 unmodified lines
64876487 __u32 btf_id;
64886488 __u32 btf_key_type_id;
64896489 __u32 btf_value_type_id;
6490− __u32 :32; /* alignment pad */
6490+ __u32 btf_vmlinux_id;
64916491 __u64 map_extra;
64926492 } __attribute__((aligned(8)));
64936493

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t