From: Jon Maloy <jmaloy@redhat.com>
To: Stuart McLaren <stuart.mclaren@hpe.com>, passt-dev@passt.top
Subject: Re: [PATCH] treewide: no L2 buffer in splice-only mode
Date: Thu, 3 Dec 2026 19:26:36 -0500 [thread overview]
Message-ID: <2c83c89d-ed79-4097-a326-86d0008c70d9@redhat.com> (raw)
In-Reply-To: <20261203175624.3078368-1-stuart.mclaren@hpe.com>
On 2026-12-03 12:56, Stuart McLaren wrote:
> Save memory by not initializing L2 memory buffers when
> running in --splice-only mode.
Nice. This looks correct to me: in --splice-only mode we never create
a tap interface, and fwd_nat_from_host() doesn't let us create flows
towards it, so none of those buffers is reachable, and keeping the
receive iovecs in udp_iov_init_one() covers the socket-to-socket path.
But I see a corner case: on master, nothing prevents --splice-only together
with --fd (documented as passt-only), and in that case we actually forward
traffic from the given file descriptor as usual. I checked this with a pipe
as fake tap device, and a UDP datagram from it was forwarded to the
host. With this patch, that traffic is silently dropped instead, as
the packet pools aren't initialised.
In my view, the new behaviour matches better what --splice-only means,
and I doubt anybody uses this combination. If we want to keep the
previous behaviour anyway, the alternative would be to still initialise
the L2 buffers if --fd is given. Something like this:
!c->splice_only || c->fd_tap != -1
instead of just !c->splice_only, in all the places this patch touches:
not just for the packet pools, but also for the TCP and UDP frames, as
we would need those to send replies back.
I leave the decision about that to Stefano.
///jon
next prev parent reply other threads:[~2026-12-04 0:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 17:56 Stuart McLaren
2026-12-04 0:26 ` Jon Maloy [this message]
2026-12-04 6:56 ` Stefano Brivio
2026-12-04 22:31 ` Stefano Brivio
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=2c83c89d-ed79-4097-a326-86d0008c70d9@redhat.com \
--to=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
--cc=stuart.mclaren@hpe.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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).