In "struct bpf_map_info", the name "btf_id", "btf_key_id" and "btf_value_id" could cause confusion because the "id" of "btf_id" means the BPF obj id given to the BTF object while "btf_key_id" and "btf_value_id" means the BTF type id within that BTF object. To make it clear, btf_key_id and btf_value_id are renamed to btf_key_type_id and btf_value_type_id.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -284,8 +284,8 @@ union bpf_attr { · 283 unmodified lines | ||
| 284 | 284 | char map_name[BPF_OBJ_NAME_LEN]; |
| 285 | 285 | __u32 map_ifindex; /* ifindex of netdev to create on */ |
| 286 | 286 | __u32 btf_fd; /* fd pointing to a BTF type data */ |
| 287 | − __u32 btf_key_id; /* BTF type_id of the key */ | |
| 288 | − __u32 btf_value_id; /* BTF type_id of the value */ | |
| 287 | + __u32 btf_key_type_id; /* BTF type_id of the key */ | |
| 288 | + __u32 btf_value_type_id; /* BTF type_id of the value */ | |
| 289 | 289 | }; |
| 290 | 290 | |
| 291 | 291 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -2219,8 +2219,8 @@ struct bpf_map_info { · 1927 unmodified lines | ||
| 2219 | 2219 | __u64 netns_dev; |
| 2220 | 2220 | __u64 netns_ino; |
| 2221 | 2221 | __u32 btf_id; |
| 2222 | − __u32 btf_key_id; | |
| 2223 | − __u32 btf_value_id; | |
| 2222 | + __u32 btf_key_type_id; | |
| 2223 | + __u32 btf_value_type_id; | |
| 2224 | 2224 | } __attribute__((aligned(8))); |
| 2225 | 2225 | |
| 2226 | 2226 | struct bpf_btf_info { |