https://gitlab.synchro.net/main/sbbs/-/commit/0a672e08eaeaf1834b35575d
Added Files:
src/doors/termgfx/pace.c pace.h
Modified Files:
src/doors/syncdoom/syncdoom.c src/doors/syncduke/syncduke_io.c src/doors/termgfx/CMakeLists.txt
Log Message:
termgfx: share the AIMD pipeline-depth controller between the doors
SyncDuke and SyncDOOM had byte-identical copies of the delay-based AIMD that settles the DSR-ack frame pipeline depth from the measured round-trip (same thresholds, same 3/4 RTT EMA feeding it, same ceiling = one frame per 40ms of baseline RTT capped at 8, same sticky floor at rt_high). Extract it once into termgfx/pace.c (termgfx_aimd_update) and have both doors' auto_depth_update call
it; the per-door tuning (the DEPTH_MAX cap, initial depth, the RTT bookkeeping and reclaim policy) stays in each door and is passed in.
First slice of the present/pace unification, and the trickiest shared algorithm.
Pure refactor -- proven bit-identical to the old inline controller across 25600 replayed (rtt, baseline, latch, time, cap, start-depth) steps, 0 mismatches.
The DSR ring + RTT EMA (with the doors' small divergences -- RTT-min re-seed window, stale-sample guard) and the deadline-reclaim/gate are the next slices.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net