raiden00pl opened a new pull request, #22000:
URL: https://github.com/apache/nuttx/pull/22000

     # Summary
     
     With several TCP connections that send and receive at the same time, the
     IOB pool runs out and the transfers stall.  Four bugs cause it; each fix
     was checked by leaving it out:
       
     - net/tcp: keep the throttled IOBs out of the read-ahead buffer.  Since
       34d2cde8a8f the read-ahead buffer keeps the received IOBs without
       CONFIG_IOB_THROTTLE, so received data can take the whole pool and no
       IOB is left to send or to refill a driver RX ring.
     - net/tcp: pass a new ACK to the application before dropping a segment.
       An old or out-of-order segment can acknowledge new data; tcp_input()
       accounts the ACK but drops TCP_ACKDATA, so an unbuffered send() waits
       forever.
     - net/tcp: do not shrink the receive window.  The window edge moves left
       with the free IOBs; since c4494c714ce a segment beyond the edge is
       dropped before its ACK is processed, so the peer's ACKs are lost and
       the connection retransmits forever (RFC 9293 SHLD-14).
     - net/tcp: wait for IOBs in an unbuffered send().  devif_send() fails
       with -ENOMEM while the pool is empty and send() returned the error to
       the application.
     
     # Impact
     
     TCP under IOB pool pressure.  No API or configuration change.
     
     # Testing
     
     4 host TCP connections echo 256 KiB each through a NuttX node at the
     same time, in random writes of 1 to 4096 bytes.
     
     sim (unbuffered TCP, 100 IOBs of 196 bytes, IOB_THROTTLE=8), with the
     netdev upper half RX lock fix (separate PR; master crashes without it):
     - master: 0 of 9 runs complete
     - with these fixes: 6 of 6 runs complete
     - without any one of them: 0/3 to 4/6 runs complete
     
     nucleo-f767zi: the same test completes with these fixes and stalls on
     master.


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

Reply via email to