Toro’s networking stack is intentionally small and explicit: drivers register with the kernel, packets are moved through a minimal send/receive API, and a socket layer builds stream connections on top of those packet primitives.
This post is a short overview of how the pieces fit together and what to expect when writing networking code in Toro today:
- Drivers: a network driver registers a TNetworkInterface and is dedicated to a CPU core before use.
- Packet I/O: SysNetworkSend() and SysNetworkRead() provide the low-level primitives; they’re designed around Toro’s cooperative scheduling model and require some care around interrupt-safety.
- Packet processing: a dedicated thread parses incoming packets (currently virtio-vsock) and dispatches them to the right socket/service.
- Sockets: Toro currently supports AF_VSOCK with stream sockets (SOCKET_STREAM). The API (SysSocket*) covers listen/accept/connect/send/recv/select/close and is meant to be simple enough to use directly for small services.
If you want the full technical reference (with the exact APIs, semantics, and current limitations), read the document here: https://github.com/torokernel/documentation/blob/main/Networking.md
Sunday, January 18, 2026
Toro Networking: from drivers to sockets (virtio-vsock)
Subscribe to:
Comments (Atom)