On Thu, 2010-04-15 at 17:54 +0800, yueyue papa wrote: > I give enough windows size e.g. 16k, and use TCP_NODELAY. > > Why I could only see 2 TCP segments out, and wait the remote ACK and > then goes on. > > Is it possible to see all TCP segment out as much as possible?
In which direction (lwIP is sending or receiving) are you seeing problems? When you set TCP_WND you are configuring how much space the stack will advertise to allow the other end to send to lwIP. This does not affect how much space lwIP has to send to the other end: this is controlled by the other end. It should be very easy to work out from a packet capture what the receive windows are in both directions, and so whether the receive windows are limiting the rate of sending. Sending in TCP is controlled by a number of things, the most important being: (i) the receiver's window, which is what you can control with TCP_WND; (ii) the congestion window which is not a configurable value. These are separate mechanisms, but the amount that lwIP can send is limited to whichever value is currently smallest. The congestion window will initially start off small, but will grow if there is no loss. When there is loss it will reduce drastically to try and limit the rate of sending as TCP assumes loss is due to congestion. This algorithm tries to find the maximum rate it can send at without seeing loss. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
