Skip to content

Claude/vibrant allen 0xt1al - #6

Merged
vnt-dev merged 4 commits into
mainfrom
claude/vibrant-allen-0xt1al
Jul 9, 2026
Merged

Claude/vibrant allen 0xt1al#6
vnt-dev merged 4 commits into
mainfrom
claude/vibrant-allen-0xt1al

Conversation

@vnt-dev

@vnt-dev vnt-dev commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

claude added 4 commits July 9, 2026 05:51
The stack previously advertised SACK-permitted and consumed the peer's
SACK blocks, but never sent its own — a peer could not selectively
retransmit into our out-of-order buffer and had to go back to the
cumulative ACK on every loss.

Pure ACKs now carry up to 4 SACK blocks (RFC 2018) merged from the
out-of-order queue whenever it is non-empty. A new TcpConfig::sack
switch (default true) controls the whole feature: negotiation,
block emission, and use of the peer's blocks. TcpConfig also gains
ack_delay (wired up in a following commit) and validation for both.

Note: adding fields to TcpConfig is a breaking change for exhaustive
struct literals; construct it via ..Default::default().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUsV3w9pksrMkRP8z2odvw
Fast retransmit previously resent every unconfirmed inflight segment
from the recovery point onward (go-back-n), including segments above
the peer's highest SACK block that were never reported lost. Recovery
now stops at the highest SACK right edge; segments above it are left
to the cumulative ACK or a later RTO. An RTO still retransmits the
whole window, per RFC 6582 semantics.

A lossy-transfer regression test with sack=false covers the pure
go-back-n fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUsV3w9pksrMkRP8z2odvw
ack_delay = None (the default) keeps the current behavior of sending a
due ACK immediately. Some(d) defers pure ACKs for up to d (bounded to
500ms per RFC 1122), cutting the pure-ACK packet rate. The delay is
bypassed whenever holding the ACK back would hurt the peer: duplicate/
out-of-order feedback that drives fast retransmit, two full segments of
unacknowledged data, a receive window reopening from zero, or any
non-established state.

The stream task folds the ACK deadline into its existing wait and
distinguishes an ACK-timer wake-up from retransmission/teardown
timeouts, so a deferred ACK cannot trigger go-back-n. The redundant
perform_post_ack_action at the loop end (which would have discarded a
deferred ACK's state) moved into try_send_ack.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUsV3w9pksrMkRP8z2odvw
iperf3 through the tcp_proxy TUN example (this container, 8s runs):

  shift  effective wnd  forward     reverse
  2      256 KiB        2.80 Gbps   2.57 Gbps
  3      512 KiB        3.04 Gbps   2.78 Gbps
  4      1 MiB          3.23 Gbps   2.71 Gbps   <- new default
  6      4 MiB          3.52 Gbps   2.66 Gbps

The old comment warned that a larger window overruns the TUN drain,
but egress batching removed that bottleneck. shift 4 takes the forward
gain with no retransmissions; going further keeps helping one-way
throughput but bounds per-connection buffering at 2x the window
(8 MiB at shift 6), which is too much for a default. Lossy/reordered
transfer tests pass at the new default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EUsV3w9pksrMkRP8z2odvw
@vnt-dev
vnt-dev merged commit 2290921 into main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants