History

bpf: rename *_info_cnt to nr_*_info in bpf_prog_info

In uapi bpf.h, currently we have the following fields in the struct bpf_prog_info: __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; The above field names "func_info_cnt" and "line_info_cnt" also appear in union bpf_attr for program loading. The original intention is to keep the names the same between bpf_prog_info and bpf_attr so it will imply what we returned to user space will be the same as what the user space passed to the kernel. Such a naming convention in bpf_prog_info is not consistent with other fields like: __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; This patch made this adjustment so in bpf_prog_info newly introduced *_info_cnt becomes nr_*_info.

Yonghong Song committed 7 years ago

Commit 11d8b821 parent 7a5725d2 files · +22 −22Browse files

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

Unified · Split

include/uapi/linux/bpf.h+3−3
@@ -2696,11 +2696,11 @@ struct bpf_prog_info { · 2695 unmodified lines
26962696 __u32 btf_id;
26972697 __u32 func_info_rec_size;
26982698 __aligned_u64 func_info;
2699− __u32 func_info_cnt;
2700− __u32 line_info_cnt;
2699+ __u32 nr_func_info;
2700+ __u32 nr_line_info;
27012701 __aligned_u64 line_info;
27022702 __aligned_u64 jited_line_info;
2703− __u32 jited_line_info_cnt;
2703+ __u32 nr_jited_line_info;
27042704 __u32 line_info_rec_size;
27052705 __u32 jited_line_info_rec_size;
27062706 } __attribute__((aligned(8)));

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