From: Mahe Tardy <mahe.tardy@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>, Eduard <eddyz87@gmail.com>,
Song Liu <song@kernel.org>
Subject: Re: [RFC PATCH bpf-next 1/4] bpf: Add netpoll kfuncs for sending UDP packets
Date: Mon, 9 Mar 2026 19:52:20 +0100 [thread overview]
Message-ID: <aa8W5JfSZUo-Y8NG@gmail.com> (raw)
In-Reply-To: <CAADnVQLyTjCk2xSdvT67kofCJS1cDOMpHdCFfNHrWg9nQMSUSA@mail.gmail.com>
On Mon, Mar 09, 2026 at 09:26:00AM -0700, Alexei Starovoitov wrote:
> On Mon, Mar 9, 2026 at 6:17 AM Mahe Tardy <mahe.tardy@gmail.com> wrote:
> >
> > +
> > + bnp = kzalloc(sizeof(*bnp), GFP_KERNEL);
>
> AI generated it and humans reviewed it ?
> Sigh. AI does a better job at this.
> Think about this line again.
Yes I reviewed this, but Song might know more on how this was generated,
my experience with handling kernel memory is fairly limited (I'm mostly
learning) but this looked good to me.
As I'm seeing it we could have used more modern wrapper like:
bnp = kzalloc_obj(*bnp)
But I'm not sure it would made a fundamental difference here since it
would be the exact same flag.
It's called from bpf_netpoll_create, that can be only called from
sleepable programs (like SYSCALL here). And it's similar to how the
crypto context is allocated in the bpf_crypto_ctx_create kfunc so I'm
not sure I understand what's wrong in our variant.
Could you help me and be more explicit on what you think is wrong?
> Also, don't bother with RFC. If you want the patches to
> land don't use RFC tag.
>
> RFC means "I don't know what I'm doing and I'm not asking
> to land it in this shape".
Okay thanks for the info, I'll remove the RFC for v2.
next prev parent reply other threads:[~2026-03-09 18:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 13:16 [RFC PATCH bpf-next 0/4] bpf: Introduce bpf_netpoll Mahe Tardy
2026-03-09 13:16 ` [RFC PATCH bpf-next 1/4] bpf: Add netpoll kfuncs for sending UDP packets Mahe Tardy
2026-03-09 13:57 ` bot+bpf-ci
2026-03-09 16:26 ` Alexei Starovoitov
2026-03-09 18:52 ` Mahe Tardy [this message]
2026-03-10 5:07 ` Song Liu
2026-03-10 5:22 ` Alexei Starovoitov
2026-03-09 13:16 ` [RFC PATCH bpf-next 2/4] selftests/bpf: Add netpoll kfunc sanity test Mahe Tardy
2026-03-09 13:16 ` [RFC PATCH bpf-next 3/4] selftests/bpf: Add netpoll kfunc IPv6 variant test Mahe Tardy
2026-03-09 13:16 ` [RFC PATCH bpf-next 4/4] selftests/bpf: Add netpoll setup basic tests Mahe Tardy
2026-03-09 17:59 ` [RFC PATCH bpf-next 0/4] bpf: Introduce bpf_netpoll Jakub Kicinski
2026-03-09 19:29 ` Martin KaFai Lau
2026-03-10 4:56 ` Song Liu
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=aa8W5JfSZUo-Y8NG@gmail.com \
--to=mahe.tardy@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=martin.lau@linux.dev \
--cc=pabeni@redhat.com \
--cc=song@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