raiden00pl commented on PR #22089:
URL: https://github.com/apache/nuttx/pull/22089#issuecomment-7037478827
I think this works around the problem instead of fixing it.
With NET_SEND_BUFSIZE and NET_RECV_BUFSIZE at 0 (the default), the
per-connection limit code is compiled out, so the write buffers and the
read-ahead of one connection can take all free IOBs.
Tested on sim, 256 IOBs of 196 bytes, IOB_THROTTLE 16, TCP write
buffers. The client sends and reads at the same time (non-blocking) to
an echo server, with a 60 s limit:
| Case | master 708c9c799b4 | this PR (c3963b08085) |
master + NET_SEND/RECV_BUFSIZE=8192 |
|-----------------------|--------------------|-----------------------|-------------------------------------|
| own address, 128 KiB | no result in 60 s | PASS |
PASS |
| own address, 1 MiB | no result in 60 s | PASS |
PASS |
| 127.0.0.1, 1 MiB | no result in 60 s | FAIL (71 KB, stall) |
PASS |
| node to node, 256 KiB | FAIL (stall) | FAIL (reset) |
PASS |
| node to node, 1 MiB | FAIL (bad data) | FAIL (bad data) |
PASS |
Taking the segment when the read-ahead is empty (the rule of
bf210560017) does not help: the three local cases still give no result.
I suggest a default limit for the write buffers and the read-ahead of
each connection, derived from the IOB pool when NET_SEND_BUFSIZE and
NET_RECV_BUFSIZE are 0, so that one connection cannot take all free
IOBs. The receive window already follows the receive limit
(tcp_calc_rcvsize())
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]