BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, bpf@vger.kernel.org
Cc: daniel@iogearbox.net, andrii@kernel.org, martin.lau@kernel.org,
	 memxor@gmail.com, kernel-team@fb.com
Subject: Re: [PATCH v3 bpf-next 0/4] bpf: Introduce may_goto and cond_break
Date: Sat, 02 Mar 2024 03:20:50 +0200	[thread overview]
Message-ID: <3c98f93bb3f0520d01d764ac4d89c66e50cbe633.camel@gmail.com> (raw)
In-Reply-To: <20240301033734.95939-1-alexei.starovoitov@gmail.com>

On Thu, 2024-02-29 at 19:37 -0800, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
> 
> v2 -> v3: Major change
> - drop bpf_can_loop() kfunc and introduce may_goto instruction instead
>   kfunc is a function call while may_goto doesn't consume any registers
>   and LLVM can produce much better code due to less register pressure.
> - instead of counting from zero to BPF_MAX_LOOPS start from it instead
>   and break out of the loop when count reaches zero
> - use may_goto instruction in cond_break macro
> - recognize that 'exact' state comparison doesn't need to be truly exact.
>   regsafe() should ignore precision and liveness marks, but range_within
>   logic is safe to use while evaluating open coded iterators.

Sorry for the delay, I will look through this patch-set over the weekend.

  parent reply	other threads:[~2024-03-02  1:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  3:37 [PATCH v3 bpf-next 0/4] bpf: Introduce may_goto and cond_break Alexei Starovoitov
2024-03-01  3:37 ` [PATCH v3 bpf-next 1/4] bpf: Introduce may_goto instruction Alexei Starovoitov
2024-03-01  3:37 ` [PATCH v3 bpf-next 2/4] bpf: Recognize that two registers are safe when their ranges match Alexei Starovoitov
2024-03-01  3:37 ` [PATCH v3 bpf-next 3/4] bpf: Add cond_break macro Alexei Starovoitov
2024-03-01  3:37 ` [PATCH v3 bpf-next 4/4] selftests/bpf: Test may_goto Alexei Starovoitov
2024-03-01 19:47   ` John Fastabend
2024-03-01 21:16     ` Alexei Starovoitov
2024-03-01 21:47       ` John Fastabend
2024-03-01 22:06         ` John Fastabend
2024-03-01 22:12           ` Alexei Starovoitov
2024-03-01 21:22   ` Alexei Starovoitov
2024-03-01  5:24 ` [PATCH v3 bpf-next 0/4] bpf: Introduce may_goto and cond_break John Fastabend
2024-03-02  1:20 ` Eduard Zingerman [this message]
2024-03-02  1:28   ` Alexei Starovoitov

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=3c98f93bb3f0520d01d764ac4d89c66e50cbe633.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    --cc=memxor@gmail.com \
    /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