a-lunev commented on a change in pull request #5138:
URL: https://github.com/apache/incubator-nuttx/pull/5138#discussion_r785393232



##########
File path: net/tcp/tcp_input.c
##########
@@ -870,6 +870,11 @@ static void tcp_input(FAR struct net_driver_s *dev, 
uint8_t domain,
 
         if ((tcp->flags & TCP_CTL) == TCP_SYN)
           {
+#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS)
+            tcp_setsequence(conn->sndseq, conn->rexmit_seq);
+#else
+            /* REVISIT for the buffered mode */

Review comment:
       > One more issue with the buffered mode I found recently based on my 
netcat testing with enabled NETUTILS_NETCAT_SENDFILE option (I implemented the 
option here: 
[apache/incubator-nuttx-apps#952](https://github.com/apache/incubator-nuttx-apps/pull/952)).
 After sending a file via netcat (over tcp_sendfile) the TCP connection is not 
finalized properly. Preliminary I think it may be similar issue with incorrect 
unackseq calculation that was with the unbuffered mode (#4656). I will 
investigate the issue.
   
   @xiaoxiang781216 As it turned out, NET_TCP_WRITE_BUFFERS and NET_SENDFILE 
options were totally inconsistent with each other. One of the visible issue was 
that after sending a file via netcat (over tcp_sendfile) the TCP connection was 
not finalized. It looks like the combination of both enabled 
NET_TCP_WRITE_BUFFERS and NET_SENDFILE options have not yet been supported in 
NuttX. PR #5239 supports this.




-- 
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-unsubscr...@nuttx.apache.org

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


Reply via email to