yamt commented on a change in pull request #2414:
URL: https://github.com/apache/incubator-nuttx/pull/2414#discussion_r676424780



##########
File path: net/tcp/tcp_send_buffered.c
##########
@@ -484,6 +485,26 @@ static uint16_t psock_send_eventhandler(FAR struct 
net_driver_s *dev,
                         wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb));
                 }
             }
+          else if (ackno == TCP_WBSEQNO(wrb))
+            {
+              /* Duplicate ACK? Retransmit data if need */
+
+              if (++TCP_WBNACK(wrb) ==
+                  CONFIG_NET_TCP_FAST_RETRANSMIT_WATERMARK)
+                {
+                  /* Do fast retransmit */
+
+                  rexmit = true;
+                }
+              else if ((TCP_WBNACK(wrb) >
+                       CONFIG_NET_TCP_FAST_RETRANSMIT_WATERMARK) &&
+                       TCP_WBNACK(wrb) == sq_count(&conn->unacked_q) - 1)

Review comment:
       in that case, we have likely already started fast retransmit.
   * do you mean the segment fast-retransmitted has lost again? such a case is 
simpler to leave to the usual "slow retransmit".
   * this implementation of fast retransmit can retransmit multiple segments. 
(usually fast retransmit only retransmit one segment. but to me this 
implementation doesn't seem to have such a mechanism.) so the calculation here 
doesn't seem to make much sense to me.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to