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 2022/01/20 13:54:31 UTC

[GitHub] [incubator-nuttx] a-lunev edited a comment on pull request #5272: net/tcp/sendfile: retransmit only one the earliest not acknowledged segment

a-lunev edited a comment on pull request #5272:
URL: https://github.com/apache/incubator-nuttx/pull/5272#issuecomment-1017523763


   > LGTM. @a-lunev Seems the TCP stack adds too much of sendfile handling, I do not think this is a good trend, since tcp is inherently streaming, the stack should not need to know if a file is being to sent, could we try to hide these details in the tcp_sendfile.c?
   
   @anchao If you mean the introduced conn->sendfile variable in #5239, unfortunately NET_TCP_WRITE_BUFFERS and NET_SENDFILE modes were totally inconsistent to each other (some part of tcp_sendfile relied on NET_TCP_WRITE_BUFFERS=n functionality and the other part of tcp_sendfile relied on NET_TCP_WRITE_BUFFERS=y functionality, however it is a nonsense).
   I have analyzed NuttX git repo history and concluded that these two simultaneously enabled options (NET_TCP_WRITE_BUFFERS and NET_SENDFILE) have never worked in NuttX (never supported by design), however some of the boards (sama5 and sim based) has these two options simultaneously enabled. That means tcp_sendfile was broken for those boards and could not work for any other board if these two options got enabled in the same config.
   In #5239 I supported the possibility to use NET_SENDFILE option if NET_TCP_WRITE_BUFFERS=y, and introducing conn->sendfile variable was a required measure to do that.
   On another hand, I am going to rework tcp_send_buffered.c as well, or at least to do a mutual unification of all 3 parts: tcp_send_buffered.c, tcp_send_unbuffered.c and tcp_sendfile.c. As a result of the intended unification I expect that the conn->sendfile variable may be removed at a later step.


-- 
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