Skip to content

bpf: per program stats

Alexei Starovoitov bpf netdev 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 6 repliesApplied
  2. v24 patches 5 repliesSuperseded
  3. v14 patches 11 repliesSuperseded

Changes in v3 from the cover letter

- rename to run_time_ns/run_cnt everywhere

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4bpf: enable program statsinclude/linux/bpf.h include/linux/filter.h kernel/bpf/core.c +3 more+129 -64 replies
2/4bpf: expose program stats via bpf_prog_infoinclude/uapi/linux/bpf.h kernel/bpf/syscall.c+7 -00 replies
3/4tools/bpf: sync bpf.h into toolstools/include/uapi/linux/bpf.h+2 -00 replies
4/4tools/bpftool: recognize bpf_prog_info run_time_ns and run_cnttools/bpf/bpftool/Documentation/bpftool-prog.rst tools/bpf/bpftool/prog.c+10 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndrii Nakryiko
SeriesA-b
1/4
2/4A-b
3/4
4/4

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

Read the v3 thread

Cover letter [PATCH v3 bpf-next 0/4] bpf: per program stats

Introduce per program stats to monitor the usage BPF

v2->v3:
- rename to run_time_ns/run_cnt everywhere

v1->v2:
- fixed u64 stats on 32-bit archs. Thanks Eric
- use more verbose run_time_ns in json output as suggested by Andrii
- refactored prog_alloc and clarified behavior of stats in subprogs

Alexei Starovoitov (4):
bpf: enable program stats
bpf: expose program stats via bpf_prog_info tools/bpf: sync bpf.h into tools
tools/bpftool: recognize bpf_prog_info run_time_ns and run_cnt

 include/linux/bpf.h                           |  9 +++++
 include/linux/filter.h                        | 20 +++++++++-
 include/uapi/linux/bpf.h                      |  2 +
 kernel/bpf/core.c                             | 31 ++++++++++++++-
 kernel/bpf/syscall.c                          | 39 ++++++++++++++++++-
 kernel/bpf/verifier.c                         |  7 +++-
 kernel/sysctl.c                               | 34 ++++++++++++++++
 .../bpftool/Documentation/bpftool-prog.rst    |  4 +-
 tools/bpf/bpftool/prog.c                      |  7 ++++
 tools/include/uapi/linux/bpf.h                |  2 +
 10 files changed, 148 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.0