yamt commented on a change in pull request #4070: URL: https://github.com/apache/incubator-nuttx/pull/4070#discussion_r664377240
########## File path: net/tcp/tcp_send.c ########## @@ -372,6 +384,13 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev, /* Update the Receiver Window */ +#ifdef CONFIG_NET_TCP_WINDOW_SCALE + if (recvwndo > 0 && conn->rcv_scale > 0) + { + recvwndo <<= conn->rcv_scale; + } +#endif + Review comment: adjusting the window for UINT16_MAX and scaling here can confuse tcp_should_send_recvwindow. i feel it's simpler to do it in tcp_get_recvwindow. how do you think? ########## File path: net/sixlowpan/sixlowpan_tcpsend.c ########## @@ -258,7 +258,12 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn, /* Update the TCP received window based on I/O buffer availability */ uint32_t rcvseq = tcp_getsequence(conn->rcvseq); - uint16_t recvwndo = tcp_get_recvwindow(dev, conn); + uint32_t recvwndo = tcp_get_recvwindow(dev, conn); + + if (recvwndo > UINT16_MAX) + { + recvwndo = UINT16_MAX; + } Review comment: doesn't this copy of tcp need scaling? -- 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