From: Martin KaFai Lau <martin.lau@linux.dev>
To: Mahe Tardy <mahe.tardy@gmail.com>, song@kernel.org
Cc: bpf@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
daniel@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org,
andrii@kernel.org, eddyz87@gmail.com
Subject: Re: [RFC PATCH bpf-next 0/4] bpf: Introduce bpf_netpoll
Date: Mon, 9 Mar 2026 12:29:35 -0700 [thread overview]
Message-ID: <42d449a1-a67e-4ebb-bf89-272072ade681@linux.dev> (raw)
In-Reply-To: <20260309131635.302424-1-mahe.tardy@gmail.com>
On 3/9/26 6:16 AM, Mahe Tardy wrote:
> This patch series introduces bpf_netpoll, a set of BPF kfuncs that allow
> BPF programs to send UDP packets via the netpoll infrastructure. This
> provides a mechanism for BPF programs (e.g., LSM hooks) to emit
> telemetry over UDP without depending on the regular networking stack.
>
> For reference, this was discussed at LSF/MM/BPF 2025[^1] in Montreal,
> and again at Plumbers 2025 in Tokyo. Liam Wisehart mentioned this work
> during his presentation of BpfJailer[^2].
>
> The main use case is to be able to completely dispense with
> agents/daemons for BPF programs after startup. In the case of
> Isovalent's Tetragon, the idea would be to be able to emit security
> alerts or export data from BPF even when the agent is down. For meta,
> according to Liam presentation[^2], this could replace logging via
> ringbuffers which created cross-binary versioning issues.
>
> The implementation follows the established kfunc lifecycle pattern
> (create/acquire/release with refcounting, kptr map storage, dtor
> registration), for example used by the network bpf_crypto kfuncs.
>
> Further patches would extend the bpf_netpoll_send kfunc to more program
> types. Note that network program types should not encounter recursion
> issues as netpoll bypasses the network stack and sends directly to the
> driver.
netpoll may be an easy replacement for bpf_ringbuf_output, which can be
used in different running contexts. If it is to replace the user space
daemon in production, it loses too many things from the networking
stack: routing, tc, etc. It could escape the current tc/tracing bpf
prog, monitoring, QoS marking, qdisc, etc. There is still the encryption
piece as well.
next prev parent reply other threads:[~2026-03-09 19:29 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
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 [this message]
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=42d449a1-a67e-4ebb-bf89-272072ade681@linux.dev \
--to=martin.lau@linux.dev \
--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=mahe.tardy@gmail.com \
--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