Configure TCP receive-window grow threshold per interface (#89) - #113
Merged
Merged
Conversation
TCPGROWRTT=<ms> in an interface file sets the handshake round trip at or above which a socket on that interface grows its receive window from BSD_TCP_WINDOW_LAN to its maximum. 1..65535, bad values are warned and ignored like TCPACKMAX. Unset is 0, which keeps the built-in 10 ms on every device, WiFiPi included; there is no per-device default. The value rides on AmiSana2If (set at open beside RXBUFFER) and bsd_tcp_window_settle reads it from the socket's own connect interface, so accepted sockets see it too. ami_bsd_tcp_window_settle and ami_bsd_tcp_window_burst_bound both take the threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_sana2_device composes ami_sana2_get_tcp_grow_rtt() with the window functions the way bsd_tcp_window_settle does: a NULL interface or an unset key keeps the rtt >= 10 line, TCPGROWRTT=2 grows a 2 ms connect. The field is a UWORD (1..65535) and the advice text is shorter, for the resident budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…installer The window setting applies to accepted sockets as well as connects, so the guide and the installer comment name the handshake round trip. The guide no longer promises growth from exactly 100352 bytes: both sizes depend on the pool and on window scaling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 28, 2026
tinic
added a commit
that referenced
this pull request
Sep 28, 2026
The v1.0.0-beta7 tag (7fd931d) contains #109 (TCPACKMAX, WiFiPi default 11,680) and #113 (TCPGROWRTT), but both entries sat under Unreleased. Notes cut from the beta7 section would have left them out and shown them as new in beta8. Moved into 1.0.0-beta7 unchanged, with the corrected sizes from #117. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
tinic
added a commit
that referenced
this pull request
Sep 28, 2026
…#119) beta7's published notes carried the #113 squash commit's body instead of the annotated tag's paragraph. actions/checkout leaves the pushed tag as a ref to the commit; on such a ref, %(contents:body) is the commit message, which the script took for the tag body. release-notes.sh reads the body only when refs/tags/$tag is a tag object (a lightweight tag gets no paragraph, as documented), and release.yml fetches the annotated tag object before rendering. Checked on the v1.0.0-beta7 tree: the annotated tag gives its four bullets; the tag rewritten as a commit ref gives no paragraph instead of the commit body. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
TCPGROWRTT=<ms>(1..65535) to interface files (#89). It sets the handshake round trip at or above which a socket on that interface grows its receive window from BSD_TCP_WINDOW_LAN (100352) to its maximum. Shaped after #109 (TCPACKMAX).TCPGROWRTT=2is an explicit opt-in.AmiSana2If.tcp_grow_rtt(set at open beside RXBUFFER). New getter:ami_sana2_get_tcp_grow_rtt().bsd_tcp_window_settle(socket.c) reads it from the socket's ownnx_tcp_socket_connect_interface. On the passive path, that is the accepted socket that select.c:133 passes in, whose interface the syncache set (nx_tcp_syncache.c:1300) before the handshake RTT. It is never the listener, whose connect_interface is NULL.ami_bsd_tcp_window_settleandami_bsd_tcp_window_burst_boundboth take the threshold (0 = built-in 10).Hardware leg (2.4 GHz WiFiPi, default vs TCPGROWRTT=2, same head): a connect with a handshake RTT of 2 ms or more must show rwnd > 100352 with TCPGROWRTT=2. If it does not, the key silently fell back to the default.
Tests:
fastare each reported once.defaulton playhouse2: bsdsocket.library is 365408 bytes, against 365308 on 08c23b2 (+100 B). The budget of 366000 is unchanged.🤖 Generated with Claude Code