From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Maloy <jmaloy@redhat.com>
Cc: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Subject: Re: Thoughts on interface modes / multiple guest addresses
Date: Mon, 22 Dec 2025 16:57:14 +1100 [thread overview]
Message-ID: <aUjduk9MKS6Ia6Jf@zatzit> (raw)
In-Reply-To: <7314536d-ecdd-4f72-9071-b3c38fd92abb@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 6245 bytes --]
On Thu, Dec 18, 2025 at 08:40:45PM -0500, Jon Maloy wrote:
>
>
> On 2025-12-17 19:14, David Gibson wrote:
> > On Wed, Dec 17, 2025 at 03:01:31PM -0500, Jon Maloy wrote:
> > >
> > >
> > > On 2025-12-16 21:01, David Gibson wrote:
> > > > On Wed, Dec 17, 2025 at 01:29:36AM +0100, Stefano Brivio wrote:
> > > > > On Tue, 16 Dec 2025 16:53:49 +1100
> > > > > David Gibson <david@gibson.dropbear.id.au> wrote:
> > > > >
> > > > > > Hi Jon,
> > > > > >
> > > > > > As discussed on the call yesterday, I've written up my thoughts on
> > > > > > what a bunch of the address semantics should be. Turns out I'd
> > > > > > already done some of this at:
> > > > > > https://pad.passt.top/p/InterfaceMode
> > > > >
> > > > > Two general comments:
> > > > >
> > > > > 1. local mode is already implemented, and some things such as the
> > > > > interface name ("tap0") are already defined, see man page and
> > > > > 'pasta -- pasta --config-net ip a'
> > > >
> > > > Yes, I'm aware. The two modes have the "normal" and "local" local to
> > > > indicate the existing modes they're more similar to (neither is
> > > > identical to current behaviour). Another point I left out is that
> > > > this is intended as an endpoint to aim at. Getting there I expect to
> > > > involve extra stuff for compatiblity along the way.
> > > >
> > > > > 2. I think it's more relevant to define the basics of how one switches
> > > > > between the existing local mode and a mode where we copy addresses
> > > > > and routes (as they become available on the host), rather than
> > > > > defining every single detail of these modes.
> > > >
> > > > Oh.. right. I guess I did't make this clear: these are modes set by
> > > > the command line (details TBD), we never switch between them at
> > > > runtime. They kind of have to be, because which mode we're in affects
> > > > how we respond to runtime changes.
> > > >
> > > > > In these terms, I think it would actually be helpful to *avoid*
> > > > > seeing them as separate modes. If there's no host connectivity, we'll
> > > > > start in local mode, and switch to the other mode as we get addresses
> > > > > and routes configured... just to switch back to the previous mode if
> > > > > we lose them.
> > > >
> > > > The whole point of all-interface mode (better name suggestions
> > > > welcome) is that the guest's routing configuration *doesn't* change,
> > > > even if the host's does.
> > > >
> > > > Advantages:
> > > > * The host can have whatever source-dependent, multi-path, bizarro
> > > > routing configuration, changing as often as it likes and we (and
> > > > the guest) don't care. Guest routes to the host, host routes
> > > > onward from there.
> > >
> > > And the other way around, the guest should be able to set up whatever
> > > he wants if that is his choice, without affecting the host. Maybe
> > > even multiple interfaces, for whatever reason that might be.
> >
> > I'm not sure I follow. We can't change net config on the host, so
> > that's basically always true - in both proposed modes, and right now.
> > So maybe you're meaning something different? I'm not sure what,
> > though.
>
> No. I was just stating a fact.
Ok.
> But if we want to give the guest full freedom
> to adapt or screw up his own namespace we may in the name of consistency
> allow him to create his own interfaces (dummy, veth, tun/tap?)
They already can, and indeed we can't really prevent it. Moreover,
there are legitimate, working cases where the guest will create other
interfaces. The most obvious is if the guest creates a VPN tunnel,
with the back end encrypted traffic going over the pasta link.
> > > We could have two modes: "transparent" and "opaque"
> >
> > I'm not 100% sold, but I think those are at least a bit better than my
> > current names (doc updated).
> >
> > > In opaque mode we get basically what you describe above, plus that we allow
> > > the guest to add new addresses/routes in runtime.
> >
> > THe guest could always add extra routes at runtime. Adding extra
> > addresses... well, it always could, the question is what - if anything
> > - passt/pasta should do about it. What do you propose?
>
> Just allow it and handle it right, i.e., as expected by the guest.
We don't necessarily know what's expected by the guest. If a physical
machine on a DHCP managed LAN were to ignore DHCP and just pick an
address, it *might* work, or its traffic might just get blackholed, or
it might get messy address conflicts, depending on the router
configuration, and what else is on the subnet, and possible firewalls
between it and the internet at large.
> > > So, we keep the multi-address configuration and and the nameaspace side
> > > subscription, but block host-side subscriptions in this mode.
> >
> > My intention was that we don't use a host-side *route* subscription in
> > this mode. We would still need a host-side address subscription to
> > implement '-a auto', which I was proposing to have allowed (and
> > enabled by default) in opaque mode.
>
> That beats the whole purpose of opaque mode, doesn't it?
Not as I see it, no.
> > > Conversely, we are fully open to host-changes in transparent mode, we
> > > subscribe for host-side changes, forward those to the namespace,
> >
> > With --config-net, yes. For passt and !--config-net we can't control
> > the guest configuration; we can only reflect as much of the host state
> > as possible via DHCP and NDP, and hope the guest will consult that and
> > update itself.
> >
> > > However, we don't allow the guest user to manipulate anything in run-time.
> >
> > Well, we can't really prevent it. I guess you mean if the guest
> > reconfigures itself, then things might break entirely and it's not our
> > fault?
>
> Yes. Give him full freedom. To fix or break his own namespace.
Agreed.
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-12-22 5:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 5:53 David Gibson
2025-12-17 0:29 ` Stefano Brivio
2025-12-17 2:01 ` David Gibson
2025-12-17 5:00 ` David Gibson
2025-12-17 23:03 ` Stefano Brivio
2025-12-17 23:52 ` David Gibson
2025-12-17 20:01 ` Jon Maloy
2025-12-18 0:14 ` David Gibson
2025-12-19 1:40 ` Jon Maloy
2025-12-22 5:57 ` David Gibson [this message]
2025-12-17 23:22 ` Stefano Brivio
2025-12-18 3:47 ` David Gibson
2025-12-18 5:32 ` Stefano Brivio
2026-01-05 4:26 ` David Gibson
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=aUjduk9MKS6Ia6Jf@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.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).