Problem
The current minislirp implementation adds substantial copy and context-switch
overhead on every packet. passt (the VM-facing counterpart of pasta, from the
passt project) achieves significantly better TCP throughput in upstream
benchmarks by using a more efficient data path.
Note: pasta connects a host network to a network namespace and is designed
for containers. Since kbox uses LKL (VM-like architecture), the correct tool
is passt, which speaks the qemu UNIX socket protocol suitable for VM
backends.
Proposed Changes
Add a --net=passt backend:
- Write an LKL netdev backend that speaks the qemu UNIX socket protocol
passt expects. This requires adapting the network initialization in
net-slirp.c or creating a new net-passt.c backend module.
- Spawn
passt as an external process, connecting to LKL via the socket
backend.
- Preserve minislirp as the zero-dependency fallback when passt is not
available.
Considerations
- Runtime detection of
passt binary and version requirements.
- Behavioral differences vs minislirp: port forwarding model, UDP/DNS
handling, IPv6 support, inbound connectivity semantics.
- Process lifecycle: supervision, cleanup, signal propagation, failure
fallback to minislirp.
- Security and isolation tradeoffs vs minislirp should be documented.
- Namespace assumptions: kbox does not create a network namespace today;
verify whether passt requires one or can operate without it.
- Relationship to bypass4netns-style socket switching: passt improves the
stack-mediated path, while socket switching bypasses the stack entirely
for eligible connections. These are complementary approaches.
Problem
The current minislirp implementation adds substantial copy and context-switch
overhead on every packet. passt (the VM-facing counterpart of pasta, from the
passt project) achieves significantly better TCP throughput in upstream
benchmarks by using a more efficient data path.
Note:
pastaconnects a host network to a network namespace and is designedfor containers. Since kbox uses LKL (VM-like architecture), the correct tool
is
passt, which speaks the qemu UNIX socket protocol suitable for VMbackends.
Proposed Changes
Add a
--net=passtbackend:passt expects. This requires adapting the network initialization in
net-slirp.cor creating a newnet-passt.cbackend module.passtas an external process, connecting to LKL via the socketbackend.
available.
Considerations
passtbinary and version requirements.handling, IPv6 support, inbound connectivity semantics.
fallback to minislirp.
verify whether passt requires one or can operate without it.
stack-mediated path, while socket switching bypasses the stack entirely
for eligible connections. These are complementary approaches.