summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/bpf_prog_linfo.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-12-10 14:51:45 -0800
committerAlexei Starovoitov <ast@kernel.org>2018-12-10 14:51:46 -0800
commitaa570ff4fd3682d35cdcc5190c380e6c4d7d08e2 (patch)
tree5821df7fea9335a55010c21dcfba92e704c92d32 /tools/lib/bpf/bpf_prog_linfo.c
parent7a5725ddc6e18aab61f647c0996d3b7eb03ff5cb (diff)
parentcfc542411bd40ff4f8a70b3d061bd6acdfb05629 (diff)
Merge branch 'rename-info_cnt-to-nr_info'
Yonghong Song says: ==================== Before func_info and line_info are added to the kernel, there are several fields in structure bpf_prog_info specifying the "count" of a user buffer, e.g., __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; The naming convention has the prefix "nr_". The func_info and line_info support added several fields __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; to indicate the "count" of buffers func_info, line_info and jited_line_info. The original intention is to keep the field names the same as those in structure bpf_attr, so it will be clear that the "count" returned to user space will be the same as the one passed to the kernel during prog load. Unfortunately, the field names *_info_cnt are not consistent with other existing fields in bpf_prog_info. This patch set renamed the fields *_info_cnt to nr_*_info to keep naming convention consistent. ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/bpf_prog_linfo.c')
-rw-r--r--tools/lib/bpf/bpf_prog_linfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bpf/bpf_prog_linfo.c b/tools/lib/bpf/bpf_prog_linfo.c
index b8af65145408..addd6e9971cc 100644
--- a/tools/lib/bpf/bpf_prog_linfo.c
+++ b/tools/lib/bpf/bpf_prog_linfo.c
@@ -105,7 +105,7 @@ struct bpf_prog_linfo *bpf_prog_linfo__new(const struct bpf_prog_info *info)
struct bpf_prog_linfo *prog_linfo;
__u32 nr_linfo, nr_jited_func;
- nr_linfo = info->line_info_cnt;
+ nr_linfo = info->nr_line_info;
/*
* Test !info->line_info because the kernel may NULL
@@ -138,7 +138,7 @@ struct bpf_prog_linfo *bpf_prog_linfo__new(const struct bpf_prog_info *info)
nr_jited_func = info->nr_jited_ksyms;
if (!nr_jited_func ||
!info->jited_line_info ||
- info->jited_line_info_cnt != nr_linfo ||
+ info->nr_jited_line_info != nr_linfo ||
info->jited_line_info_rec_size < sizeof(__u64) ||
info->nr_jited_func_lens != nr_jited_func ||
!info->jited_ksyms ||