Skip to main content

Module poll

Module poll 

Source
Expand description

Single-threaded epoll-driven event loop for the yip data plane.

run_poll drives both the UDP socket and TUN fd from a single OS thread, eliminating the need for Arc<Mutex<...>> across two threads. The caller provides a Dispatch implementor that owns all mutable data-plane state.

This module contains all Linux epoll/fcntl unsafe code for yipd. Every unsafe block carries a // SAFETY: comment explaining the invariants.

Structs§

EgressDatagram
One egress datagram: its destination, plus the FEC “fate group” it belongs to.

Enums§

DispatchOut
What run_poll must do after a call to Dispatch::on_udp.

Traits§

Dispatch
A single-threaded data-plane dispatch interface.

Functions§

run_poll
Run the epoll event loop until an I/O error is returned.