patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Yureka <yuka@yuka.dev>, Alyssa Ross <hi@alyssa.is>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH v1 RFC 1/4] vm/sys/net: remove connman & dbus
Date: Tue, 25 Nov 2025 20:25:14 -0500	[thread overview]
Message-ID: <132e6cc0-25ce-4d81-8087-895237a7e299@gmail.com> (raw)
In-Reply-To: <2cf02c2f-04f9-4983-9017-80a700423bf3@yuka.dev>


[-- Attachment #1.1.1: Type: text/plain, Size: 5718 bytes --]

On 11/25/25 06:37, Yureka wrote:
> On 11/25/25 11:15, Alyssa Ross wrote:
>> Yureka Lilian <yureka@cyberchaos.dev> writes:
>>
>>> In preparation to integrating xdp-forwarder, making the net-vm a net-driver VM.
>>>
>>> Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
>>> ---
>>>   vm/sys/net/Makefile                           |  2 +-
>>>   vm/sys/net/default.nix                        |  8 +++-----
>>>   vm/sys/net/file-list.mk                       | 13 +------------
>>>   vm/sys/net/image/etc/dbus-1/system.conf       |  8 --------
>>>   .../etc/s6-rc/connman/dependencies.d/dbus     |  0
>>>   vm/sys/net/image/etc/s6-rc/connman/run        | 19 -------------------
>>>   vm/sys/net/image/etc/s6-rc/connman/type       |  1 -
>>>   .../net/image/etc/s6-rc/connman/type.license  |  2 --
>>>   .../net/image/etc/s6-rc/dbus/notification-fd  |  1 -
>>>   .../etc/s6-rc/dbus/notification-fd.license    |  2 --
>>>   vm/sys/net/image/etc/s6-rc/dbus/run           | 10 ----------
>>>   vm/sys/net/image/etc/s6-rc/dbus/type          |  1 -
>>>   vm/sys/net/image/etc/s6-rc/dbus/type.license  |  2 --
>>>   .../image/etc/s6-rc/ok-all/contents.d/sysctl  |  0
>>>   vm/sys/net/image/etc/s6-rc/sysctl/type        |  1 -
>>>   .../net/image/etc/s6-rc/sysctl/type.license   |  2 --
>>>   vm/sys/net/image/etc/s6-rc/sysctl/up          |  4 ----
>>>   vm/sys/net/image/etc/sysctl.conf              |  4 ----
>>>   18 files changed, 5 insertions(+), 75 deletions(-)
>>>   delete mode 100644 vm/sys/net/image/etc/dbus-1/system.conf
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/dependencies.d/dbus
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/run
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/type
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/type.license
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/notification-fd
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/notification-fd.license
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/run
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/type
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/type.license
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/ok-all/contents.d/sysctl
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/type
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/type.license
>>>   delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/up
>>>   delete mode 100644 vm/sys/net/image/etc/sysctl.conf
>> Won't we still need connman or NetworkManager or something to configure
>> Wi-Fi?
> 
> Thank you for this excellent question.

Me too!

I have some comments below, but I will be the first to state that
none of them should block merging this patch.  The current situation
is definitely unsatisfactory.

> connman and NetworkManager are all-in-one tools for networking. They 
> mostly provide a unified interface for the underlying stacks 
> (wpa_supplicant/iwd, kernel networking stack, firewall, VPNs). I don't 
> expect we can re-use such an all-in-one tool in the driver VM, as the 
> driver VM is only responsible for one device and shuffling data from and 
> to it. In the Wi-Fi case there is an exception because the device needs 
> special configuration, with user input. In the future, I see 
> wpa_supplicant as a candidate which can maintain Wi-Fi connections in a 
> stateful configuration file, providing both a cli and a GUI which we 
> could forward to the user.

NetworkManager has the advantage that good GUI and CLI tools for it
already exist.  That said, if we are going to use a daemon directly,
I strongly recommend going with iwd over wpa_supplicant.  It has much
better code quality and can handle network configuration itself.

> For more complex networking configuration, I would expect them to be 
> done via the VM "graph", where an advanced user could build a chain of 
> provider VMs which do 1:n multiplexing (the router I'm currently 
> writing), n:1 multiplexing (something like Android's automatic switching 
> between Wi-Fi, cellular uplink and cabled connections depending on 
> network conditions), and VPN/Tor as a 1:1 provider performing some 
> encapsulation.

I don't think that n:1 multiplexing is an advanced configuration.
My home laptop and probably many others has Wi-Fi and Ethernet, and
others have Wi-Fi and USB/Thunderbolt docking stations.  Yet other
devices will have cellular data too.  It's a mess, and it should work
out of the box.

> In this current patch series the spectrum router takes over the 1:n 
> multiplexing that connman was previously used for. For the n:1 
> multiplexing needed for network devices with multiple interfaces, I 
> expect to just use the next best one which receives router 
> advertisements (which should be similar to the previous user experience 
> with connman), but in this current patch series the n:1 multiplexing is 
> not implemented.

NetworkManager might have more complex policies.  If so, it might be
best to reuse it.  I don't think this is an area where it is worth
diverging too much from most Linux distros.

> From what I can tell Wi-Fi was not a previously working feature, and 
> supporting it in the future via wpa_supplicant would not be much more 
> difficult, as we have tested the router in principle supports 
> multiplexing multiple apps to one Wi-Fi connection.
Getting Wi-Fi working should be quite simple, but I expect that
choosing between different networks won't be, at least for all of the
types of networks in the wild.  I would love to be prove wrong on this.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-11-26  1:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 16:35 [PATCH v1 RFC 0/4] spectrum-router Yureka Lilian
2025-11-24 16:35 ` [PATCH v1 RFC 1/4] vm/sys/net: remove connman & dbus Yureka Lilian
2025-11-25 10:15   ` Alyssa Ross
2025-11-25 11:37     ` Yureka
2025-11-26  1:25       ` Demi Marie Obenour [this message]
2025-11-24 16:35 ` [PATCH v1 RFC 2/4] vm/sys/net: integrate xdp-forwarder Yureka Lilian
2025-11-26 10:53   ` Alyssa Ross
2025-11-24 16:35 ` [PATCH v1 RFC 3/4] tools: add spectrum-router Yureka Lilian
2025-11-24 19:05   ` Demi Marie Obenour
2025-11-24 16:35 ` [PATCH v1 RFC 4/4] host: integrate router Yureka Lilian
2025-11-24 19:10   ` Demi Marie Obenour
2025-11-24 20:06     ` Yureka

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=132e6cc0-25ce-4d81-8087-895237a7e299@gmail.com \
    --to=demiobenour@gmail.com \
    --cc=devel@spectrum-os.org \
    --cc=hi@alyssa.is \
    --cc=yuka@yuka.dev \
    /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://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

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).