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

   ## Summary
   
     Alternative to #22070, fixes #22050.
   
     tcp_get_recvwindow() offers every connection all free IOBs at
     CONFIG_IOB_BUFSIZE bytes each, so the peers send more than the IOB pool
     and the device can take:
     
     - A received segment keeps its whole frame: 1460 bytes take 8 IOBs of
       196 bytes.
     - The other connections already have windows open on the same IOBs.
     - A slow device with a large IOB pool drops frames when the peer sends a
       whole window at line rate.
     
     Without out-of-order buffering, TCP then loses the rest of the window.
     
     This PR counts the window in whole segments of the IOBs left after the
     windows of the other connections, and limits the window of a connection
     after it loses frames.  Changes are in net/tcp only, no configuration
     option.
     
     ## Why this instead of #22070
     
     - #22070 still counts CONFIG_IOB_BUFSIZE bytes per IOB, so a single
       connection is offered more than the pool holds.
     - It splits the pool by the number of connections, including listening
       and idle ones, and ignores windows already advertised, which cannot
       shrink.
     - It does not handle a device that drops frames.
       
     ## Impact
       
     No throttle drops and no window-sized losses on small or shared IOB
     pools and on slow devices.  Four new fields in struct tcp_conn_s.
       
     ## Testing
       
     - sim, 4 concurrent TCP streams on a 100-IOB pool: 15/20 runs pass on
       master, 20/20 with this PR.
     - nucleo-f207zg, 200 IOBs, TCP host->node: 1.1 Mbit/s on master,
       9.2 Mbit/s with this PR.


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