You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/10/13 00:34:00 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #4659: net/tcp(unbuffered): retransmit only one the earliest not acknowledged segment

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



##########
File path: net/tcp/tcp_send_unbuffered.c
##########
@@ -243,18 +243,54 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
 
   else if ((flags & TCP_REXMIT) != 0)
     {
+#if defined(CONFIG_NET_TCP_SPLIT)
       /* Yes.. in this case, reset the number of bytes that have been sent
        * to the number of bytes that have been ACKed.
        */
 
       pstate->snd_sent = pstate->snd_acked;

Review comment:
       doesn't this mean not to resend bytes already acked?
   if this is not working for some reasons, it's better to fix it instead of introducing a separate code path.

##########
File path: net/tcp/tcp.h
##########
@@ -172,6 +172,9 @@ struct tcp_conn_s
   uint8_t  rcvseq[4];     /* The sequence number that we expect to
                            * receive next */
   uint8_t  sndseq[4];     /* The sequence number that was last sent by us */
+#if !defined(CONFIG_NET_TCP_SPLIT) && !defined(CONFIG_NET_TCP_WRITE_BUFFERS)
+  uint32_t rexmit_seq;    /* The sequence number to be retrasmitted */

Review comment:
       i feel a bit uneasy about yet another communication channel to tcp_send.c.
   isn't it a responsibility of tcp_send_xxx and other event handlers to set sndseq appropriately?




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org