bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Pedro Tammela <pctammela@gmail.com>
Cc: Pedro Tammela <pctammela@mojatatu.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Joe Stringer <joe@cilium.io>,
	Quentin Monnet <quentin@isovalent.com>,
	Yang Li <yang.lee@linux.alibaba.com>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: add 'BPF_RB_MAY_WAKEUP' flag
Date: Sat, 3 Apr 2021 08:51:16 -0700	[thread overview]
Message-ID: <CAEf4BzYp+y_FqSpvdmskuWipJLX=Bp1rUEAnB0vsV-5sYXv8ww@mail.gmail.com> (raw)
In-Reply-To: <CAKY_9u0CQHmzA3YMWw24w-NbH8CK3d7Nt-jaB4EoyN7pK_fJUA@mail.gmail.com>

On Sat, Apr 3, 2021 at 6:34 AM Pedro Tammela <pctammela@gmail.com> wrote:
>
> Em qua., 31 de mar. de 2021 às 03:54, Andrii Nakryiko
> <andrii.nakryiko@gmail.com> escreveu:
> >
> > On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela <pctammela@gmail.com> wrote:
> > >
> > > The current way to provide a no-op flag to 'bpf_ringbuf_submit()',
> > > 'bpf_ringbuf_discard()' and 'bpf_ringbuf_output()' is to provide a '0'
> > > value.
> > >
> > > A '0' value might notify the consumer if it already caught up in processing,
> > > so let's provide a more descriptive notation for this value.
> > >
> > > Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
> > > ---
> >
> > flags == 0 means "no extra modifiers of behavior". That's default
> > adaptive notification. If you want to adjust default behavior, only
> > then you specify non-zero flags. I don't think anyone will bother
> > typing BPF_RB_MAY_WAKEUP for this, nor I think it's really needed. The
> > documentation update is nice (if no flags are specified notification
> > will be sent if needed), but the new "pseudo-flag" seems like an
> > overkill to me.
>
> My intention here is to make '0' more descriptive.
> But if you think just the documentation update is enough, then I will
> remove the flag.

flags == 0 means "default behavior", I don't think you have to
remember which verbose flag you need to specify for that, so I think
just expanding documentation is sufficient and better. Thanks!

>
> >
> > >  include/uapi/linux/bpf.h                               | 8 ++++++++
> > >  tools/include/uapi/linux/bpf.h                         | 8 ++++++++
> > >  tools/testing/selftests/bpf/progs/ima.c                | 2 +-
> > >  tools/testing/selftests/bpf/progs/ringbuf_bench.c      | 2 +-
> > >  tools/testing/selftests/bpf/progs/test_ringbuf.c       | 2 +-
> > >  tools/testing/selftests/bpf/progs/test_ringbuf_multi.c | 2 +-
> > >  6 files changed, 20 insertions(+), 4 deletions(-)
> > >
> >
> > [...]

      reply	other threads:[~2021-04-03 15:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 16:10 [PATCH bpf-next] bpf: add 'BPF_RB_MAY_WAKEUP' flag Pedro Tammela
2021-03-28 16:10 ` [PATCH bpf-next] bpf: check flags in 'bpf_ringbuf_discard()' and 'bpf_ringbuf_submit()' Pedro Tammela
2021-03-29 16:10   ` Song Liu
2021-03-30 14:22     ` Pedro Tammela
2021-03-30 18:12       ` Song Liu
2021-03-31  6:58   ` Andrii Nakryiko
2021-03-28 16:10 ` [PATCH bpf-next] libbpf: Add '_wait()' and '_nowait()' macros for 'bpf_ring_buffer__poll()' Pedro Tammela
2021-03-29 16:28   ` Song Liu
2021-03-31 18:59     ` Andrii Nakryiko
2021-03-29 16:05 ` [PATCH bpf-next] bpf: add 'BPF_RB_MAY_WAKEUP' flag Song Liu
2021-03-31  6:53 ` Andrii Nakryiko
2021-04-03 13:34   ` Pedro Tammela
2021-04-03 15:51     ` Andrii Nakryiko [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='CAEf4BzYp+y_FqSpvdmskuWipJLX=Bp1rUEAnB0vsV-5sYXv8ww@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=joe@cilium.io \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pctammela@gmail.com \
    --cc=pctammela@mojatatu.com \
    --cc=quentin@isovalent.com \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yang.lee@linux.alibaba.com \
    --cc=yhs@fb.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;
as well as URLs for NNTP newsgroup(s).