You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/12/27 17:05:09 UTC

[incubator-nuttx] branch master updated: net/tcp(unbuffered): fixed an issue with tx_unacked overflow that occurred if NET_TCP_WINDOW_SCALE option was enabled. If the remote TCP receiver advertised TCP window size greater than 64 KB and TCP ACK packets returned to the NuttX TCP sender with a significant delay, tx_unacked variable overflowed and further TCP send stalled forever (until TCP re-connection).

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 19dc121  net/tcp(unbuffered): fixed an issue with tx_unacked overflow that occurred if NET_TCP_WINDOW_SCALE option was enabled. If the remote TCP receiver advertised TCP window size greater than 64 KB and TCP ACK packets returned to the NuttX TCP sender with a significant delay, tx_unacked variable overflowed and further TCP send stalled forever (until TCP re-connection).
19dc121 is described below

commit 19dc121a4fd73b8cf4e772de352be97ea2066523
Author: Alexander Lunev <al...@mail.ru>
AuthorDate: Sun Dec 26 22:50:29 2021 +0300

    net/tcp(unbuffered): fixed an issue with tx_unacked overflow that occurred if NET_TCP_WINDOW_SCALE option was enabled.
    If the remote TCP receiver advertised TCP window size greater than 64 KB
    and TCP ACK packets returned to the NuttX TCP sender with a significant delay,
    tx_unacked variable overflowed and further TCP send stalled forever
    (until TCP re-connection).
---
 net/tcp/tcp.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h
index 245cba1..a42bfe6 100644
--- a/net/tcp/tcp.h
+++ b/net/tcp/tcp.h
@@ -215,7 +215,8 @@ struct tcp_conn_s
   int32_t  snd_bufs;      /* Maximum amount of bytes queued in send */
   sem_t    snd_sem;       /* Semaphore signals send completion */
 #endif
-#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
+#if defined(CONFIG_NET_TCP_WRITE_BUFFERS) || \
+    defined(CONFIG_NET_TCP_WINDOW_SCALE)
   uint32_t tx_unacked;    /* Number bytes sent but not yet ACKed */
 #else
   uint16_t tx_unacked;    /* Number bytes sent but not yet ACKed */