This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a63275cdce887d72f848bc10be860db8499b7a8c Author: Marco Casaroli <[email protected]> AuthorDate: Wed Nov 25 19:38:54 2026 +0100 Documentation/os/networking: Describe the limits on connections in SYN_RCVD. The passive open section of the TCP state machine page now says that the backlog of listen() limits the connections in TCP_SYN_RCVD, that a SYN to a full backlog frees the oldest of them, and that CONFIG_NET_TCP_SYN_RESERVE keeps connections from incoming SYNs. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/os/networking/tcp_state_machine.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/os/networking/tcp_state_machine.rst b/Documentation/os/networking/tcp_state_machine.rst index 42e6bf3c457..1d1750d2288 100644 --- a/Documentation/os/networking/tcp_state_machine.rst +++ b/Documentation/os/networking/tcp_state_machine.rst @@ -135,6 +135,14 @@ When a SYN arrives: -> TCP_ESTABLISHED (tcp_input receives final ACK) -> accept() wakes up (tcp_accept_connection()) +The connections in ``TCP_SYN_RCVD`` of a listener and the connections that +wait for ``accept()`` together take at most the backlog of ``listen()``. A +SYN to a listener whose backlog is full of connections in ``TCP_SYN_RCVD`` +frees the oldest of them. The last ``CONFIG_NET_TCP_SYN_RESERVE`` free +connections are kept for ``socket()`` and ``connect()``: then a SYN also +frees the oldest connection in ``TCP_SYN_RCVD`` of its listener, or it is +refused. + Graceful close (active close) -----------------------------
