netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Dave Marchevsky <davemarchevsky@fb.com>, bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Dave Marchevsky <davemarchevsky@fb.com>
Subject: RE: [PATCH v2 bpf-next 0/2] bpf: keep track of verifier insn_processed
Date: Mon, 18 Oct 2021 09:03:53 -0700	[thread overview]
Message-ID: <616d9ae958a68_1eb120856@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <20211011205415.234479-1-davemarchevsky@fb.com>

Dave Marchevsky wrote:
> This is a followup to discussion around RFC patchset "bpf: keep track of
> prog verification stats" [0]. The RFC elaborates on my usecase, but to
> summarize: keeping track of verifier stats for programs as they - and
> the kernels they run on - change over time can help developers of
> individual programs and BPF kernel folks.
> 
> The RFC added a verif_stats to the uapi which contained most of the info
> which verifier prints currently. Feedback here was to avoid polluting
> uapi with stats that might be meaningless after major changes to the
> verifier, but that insn_processed or conceptually similar number would
> exist in the long term and was safe to expose.
> 
> So let's expose just insn_processed via bpf_prog_info and fdinfo for now
> and explore good ways of getting more complicated stats in the future.
> 
> [0] https://lore.kernel.org/bpf/20210920151112.3770991-1-davemarchevsky@fb.com/
> 
> v1->v2:
>   * Rename uapi field from insn_processed to verified_insns [Daniel]
>   * use 31 bits of existing bitfield space in bpf_prog_info [Daniel]
>   * change underlying type from 64-> 32 bits [Daniel]
> 
> Dave Marchevsky (2):
>   bpf: add verified_insns to bpf_prog_info and fdinfo
>   selftests/bpf: add verif_stats test
> 
>  include/linux/bpf.h                           |  1 +
>  include/uapi/linux/bpf.h                      |  2 +-
>  kernel/bpf/syscall.c                          |  8 +++--
>  kernel/bpf/verifier.c                         |  1 +
>  tools/include/uapi/linux/bpf.h                |  2 +-
>  .../selftests/bpf/prog_tests/verif_stats.c    | 31 +++++++++++++++++++
>  6 files changed, 41 insertions(+), 4 deletions(-)
>  create mode 100644 tools/testing/selftests/bpf/prog_tests/verif_stats.c
> 
> -- 
> 2.30.2
> 

For the series.

Acked-by: John Fastabend <john.fastabend@gmail.com>

      parent reply	other threads:[~2021-10-18 16:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 20:54 [PATCH v2 bpf-next 0/2] bpf: keep track of verifier insn_processed Dave Marchevsky
2021-10-11 20:54 ` [PATCH v2 bpf-next 1/2] bpf: add verified_insns to bpf_prog_info and fdinfo Dave Marchevsky
2021-10-18 21:22   ` Andrii Nakryiko
2021-10-20  8:03     ` Dave Marchevsky
2021-10-11 20:54 ` [PATCH v2 bpf-next 2/2] selftests/bpf: add verif_stats test Dave Marchevsky
2021-10-18 21:24   ` Andrii Nakryiko
2021-10-18 16:03 ` John Fastabend [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=616d9ae958a68_1eb120856@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davemarchevsky@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).