Skip to content

rename *_info_cnt to nr_*_info in bpf_prog_info

Yonghong Song netdev 1 version Applied

Status from this message: Applied to bpf-next. Thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3bpf: rename *_info_cnt to nr_*_info in bpf_prog_infoinclude/uapi/linux/bpf.h kernel/bpf/syscall.c+22 -220 replies
2/3tools/bpf: sync kernel uapi bpf.h to tools directorytools/include/uapi/linux/bpf.h+3 -30 replies
3/3tools/bpf: rename *_info_cnt to nr_*_infotools/bpf/bpftool/prog.c tools/lib/bpf/bpf_prog_linfo.c tools/testing/selftests/bpf/test_btf.c+56 -560 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMartin KaFai LauSong Liu
1/3A-b A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] rename *_info_cnt to nr_*_info in bpf_prog_info

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.

Yonghong Song (3):
bpf: rename *_info_cnt to nr_*_info in bpf_prog_info tools/bpf: sync kernel uapi bpf.h to tools directory tools/bpf: rename *_info_cnt to nr_*_info

 include/uapi/linux/bpf.h               |  6 +--
 kernel/bpf/syscall.c                   | 38 ++++++++--------
 tools/bpf/bpftool/prog.c               | 48 ++++++++++-----------
 tools/include/uapi/linux/bpf.h         |  6 +--
 tools/lib/bpf/bpf_prog_linfo.c         |  4 +-
 tools/testing/selftests/bpf/test_btf.c | 60 +++++++++++++-------------
 6 files changed, 81 insertions(+), 81 deletions(-)
Signature · 1 line
2.17.1