TCP issue

Joel Sherrill joel.sherrill at OARcorp.com
Wed Sep 14 01:16:51 UTC 2011


Martin,

Is the code similar or different in recent FreeBSD? This sounds like a bug that should have been fixed there. You may be able to go through the BSD history of that file and see the fix.  It has happened before and we can hope it happens this time.

--joel

Martin Kocian <kocian at slac.stanford.edu> wrote:

>
>Hi,
>
>I discovered an issue with TCP where RTEMS hangs when after an idle 
>period it tries to send a small message followed by a large message.
>Looking at tcp_output.c I think I understand what's going on:
>When TCP is idle for awhile the congestion window gets reset to t_maxseg.
>Then the first message I send is smaller than t_maxseg so it is sent out 
>in a single packet. The receiver (Linux) only sends an ACK on every other 
>packet so no ACK comes back which means the RTEMS congestion window stays 
>at t_maxseg.
>Now we send a message that is larger than t_maxseg. Len (the number of 
>bytes to be sent) gets set to congestion window size (t_maxseg) minus 
>the length of the first (unacknowledged) message.
>The conditions in the code to actually send the next packet are:
>- len = t_maxseg 
>- This is the last part in a send and idle or NODELAY set 
>- Time-out
>- We have more then 1/2 the maximum send window's worth of data
>- Retransmitting
>
>All of the conditions are false so the send hangs until the Linux side 
>times out and sends the ACK.
>This looks like a bug to me but I'm no TCP expert so any confirmation or
>suggestion on how to fix this would be greatly appreciated.
>
>Thank you,
>
>Martin
>
>
>_______________________________________________
>rtems-users mailing list
>rtems-users at rtems.org
>http://www.rtems.org/mailman/listinfo/rtems-users




More information about the users mailing list