multiport: bring docs and comments in line with the lane design

examples/config.yml still described lanes as extra tunnels with their own
handshakes, built lazily per routine. Rewrite it for lanes as sessions derived
from the base tunnel, and say that multiport.lanes only bounds sending.

In design/multiport.md, correct the partner-lane pairing (our lane s pairs
with the peer's lane s+portOffset, which laneBias lines up), the asymmetric
host example, the retry backoff, which reader owns what, the full-path
diagram, the demand-after-reset story and the metric descriptions.

Drop comments left over from earlier iterations: base traffic on "socket 0",
lanes picked by routine, lane handshakes, and multiport defaulting on.
This commit is contained in:
Wade Simmons committed 2026-10-01 16:50:52 -05:00
1 parent a7e407181a
commit 57f3512229
9 files changed
+80 -64

No files matched your search

+3 -4
View File
@@ -45,7 +45,7 @@ type InterfaceConfig struct {
routines int
// Multiport means the sockets are spread over a range of ports
// (listen.port+slot) rather than all sharing listen.port, and that lane
// tunnels are negotiated with capable peers.
// sessions are negotiated with capable peers.
Multiport bool
// RoutinesPerPort is how many sockets share each port under multiport, and so
// the stride between port slots in writers: writers[s*RoutinesPerPort+r] is
@@ -294,9 +294,8 @@ func (f *Interface) activate() error {
"fips140Enforced", fips140.Enforced(),
)
// Under multiport each socket has exactly one reader on its own port, so
// the shared-port multi-reader capability is irrelevant (and main.go
// already hard-errored on unsupported platforms).
// Under multiport, main.go already probed this capability and turned
// multiport off where it is missing, so there is nothing to fall back from.
if f.routines > 1 && !f.multiport && !f.outside.SupportsMultipleReaders() {
f.routines = 1
f.l.Warn("multiple udp readers are not supported on this platform, falling back to a single routine")