pmd-pytcp 0.2.0
Highlights
- Dynamic send-MSS: PLPMTUD probing mode now works (
tcp.mtu_probing=2). Five defects fixed — the BASE-state deadlock (RFC 4821 §7.1 implicit confirmation is now wired), the interface-MTU working-seed that disarmed grow-on-ack, false probe-ACKs from repaired ranges (loss is now detected precisely at retransmission-overlap), single-lucky-ACK commits (candidates now need 3 consecutive ACKs), and missing black-hole recovery (an RTO at a probe-raised PLPMTU revokes the raise back to the operator seed and narrows the search). The working MSS starts at the operator-declared safe seed and only rises through sizes the path actually ACKed; every failure mode degrades to the seed, never below. - Runtime hot-path log gate: all 546
__debug__ and log(...)sites becamelog.enabled and log(...)— message f-strings are no longer formatted per packet when logging is off (previously 30–55% of bulk-transfer CPU in normal, non--Oruns).stack.init()arms the gate; callrefresh_log_enabled()after changing thepmd_pytcplogger level at runtime. - New sysctls:
tcp.plpmtud.probe_timer_ms(RFC 8899 PROBE_TIMER, default 30000 — previously never fired at all; now polled from the probe-emit path) andtcp.rto.min_ms(RFC 6298 §2.4 floor for the computed RTO, default 1000 — lower it Linux-style on known-low-RTT paths).
Defaults are unchanged: probing stays off, the RTO floor stays at 1 s, classical shrink-only PMTUD is untouched. Measured through pymobiledevice3's --userspace tunnel (the motivating consumer): upload 9.1 → ~25 MB/s, download 63 → 79 MB/s.
30 new unit tests cover the probing-mode engine, the TCP adapter glue, the RTO floor and the log gate.