Skip to main content

start_network_stack

Function start_network_stack 

Source
pub fn start_network_stack(
    queues: Arc<NetworkFrameQueues>,
    config: VirtioPollConfig,
    tcp_receiver: Option<Receiver<AcceptedTcpConnection>>,
) -> Result<JoinHandle<()>>
Expand description

Start the dedicated smoltcp poll thread for the virtio-net backend.

This creates one long-lived poll loop thread per guest NIC. That thread owns the smoltcp Interface, its socket set, and the TCP relay table.

Ownership boundary:

  • this thread owns all smoltcp state
  • relay threads never touch smoltcp sockets directly
  • frame bridge threads never parse protocols beyond raw Ethernet framing