You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "wengzhe (via GitHub)" <gi...@apache.org> on 2023/02/03 09:35:17 UTC
[GitHub] [nuttx] wengzhe opened a new pull request, #8421: net/tcp: Regard snd_wnd update as ACKDATA
wengzhe opened a new pull request, #8421:
URL: https://github.com/apache/nuttx/pull/8421
## Summary
Receiving an ACK indicating TCP Window Update will not set ACKDATA flag (because tx_unacked is 0) in our TCP stack. Then this ACK won't let us send anything after receiving it, even if it updates snd_wnd. So we need to check whether we can send data immediately when our snd_wnd is updated (especially from 0), otherwise we will only send next data after timer expiry.
![image](https://user-images.githubusercontent.com/7105993/216291135-e0b7d2cb-7c49-4e4a-92ca-c45596947c6c.png)
## Impact
TCP between two NuttX sim is slow because the TCP stream will stuck frequently once after TCP window is full and wait timer to recover. This patch fixes this.
## Testing
`iperf` on `sim:rpserver` with config
```Kconfig
CONFIG_NET_RECV_BUFSIZE=16384 # default size can also trigger, but smaller value is easier
CONFIG_SCHED_TICKLESS=y # let performance be maximized
```
Without this patch
```
Interval Transfer Bandwidth
-0.00- 1.00 sec 51424 Bytes 0.00 Mbits/sec
1.00- 2.00 sec 105604 Bytes 0.00 Mbits/sec
2.00- 3.00 sec 0 Bytes 0.00 Mbits/sec
3.00- 4.00 sec 52072 Bytes 0.00 Mbits/sec
4.00- 5.00 sec 17844 Bytes 0.00 Mbits/sec
5.00- 6.00 sec 17844 Bytes 0.00 Mbits/sec
6.00- 7.00 sec 0 Bytes 0.00 Mbits/sec
7.00- 8.00 sec 35532 Bytes 0.00 Mbits/sec
8.00- 9.00 sec 33904 Bytes 0.00 Mbits/sec
9.00- 10.00 sec 131724 Bytes 1.00 Mbits/sec
```
With this patch
```
Interval Transfer Bandwidth
-0.00- 1.00 sec 40828304 Bytes 325.97 Mbits/sec
1.00- 2.00 sec 40645812 Bytes 324.97 Mbits/sec
2.00- 3.00 sec 41045180 Bytes 327.93 Mbits/sec
3.00- 4.00 sec 40253184 Bytes 321.97 Mbits/sec
4.00- 5.00 sec 40252032 Bytes 321.97 Mbits/sec
5.00- 6.00 sec 40133452 Bytes 320.94 Mbits/sec
6.00- 7.00 sec 40594296 Bytes 323.97 Mbits/sec
7.00- 8.00 sec 40467664 Bytes 322.94 Mbits/sec
8.00- 9.00 sec 40813964 Bytes 325.97 Mbits/sec
9.00- 10.00 sec 39897760 Bytes 318.90 Mbits/sec
```
--
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
[GitHub] [nuttx] pkarashchenko merged pull request #8421: net/tcp: Regard snd_wnd update as ACKDATA
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko merged PR #8421:
URL: https://github.com/apache/nuttx/pull/8421
--
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