aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2018-12-10 14:14:08 -0800
committerAlexei Starovoitov <ast@kernel.org>2018-12-10 14:51:45 -0800
commit11d8b82d2222cade12caad2c125f23023777dcbc (patch)
tree0a7255b7e81824ff6714e6e7694f329c18a1d740 /include
parentbpf: clean up bpf_prog_get_info_by_fd() (diff)
downloadlinux-dev-11d8b82d2222cade12caad2c125f23023777dcbc.tar.xz
linux-dev-11d8b82d2222cade12caad2c125f23023777dcbc.zip
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. Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/bpf.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 1bee1135866a..f943ed803309 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -2696,11 +2696,11 @@ struct bpf_prog_info {
__u32 btf_id;
__u32 func_info_rec_size;
__aligned_u64 func_info;
- __u32 func_info_cnt;
- __u32 line_info_cnt;
+ __u32 nr_func_info;
+ __u32 nr_line_info;
__aligned_u64 line_info;
__aligned_u64 jited_line_info;
- __u32 jited_line_info_cnt;
+ __u32 nr_jited_line_info;
__u32 line_info_rec_size;
__u32 jited_line_info_rec_size;
} __attribute__((aligned(8)));