On Wed, 2009-10-21 at 19:23 +0200, [email protected] wrote: > David Shmelzer wrote: > > I'm still confused as to why the the window size is decreasing in the > > first place in 1.3.1 and not in 1.3.0. Isn't that causing the silly > > window syndrome? The lwIP server is processing the packets immediately > > via the callback API so the window should not be decreasing. > > > That seems like a bug in the silly window avoidance mechanism: at the > time your application calls tcp_recved() to release the windows space of > the newly received data, the stack doesn't know it hasn't sent out the > decreased window yet. You're right that it shouldn't shrink the window > in this case.
There's a very important difference here between: 1) The value for the window in the TCP header decreases as the ACK field increases, meaning the available window goes down but the right edge of the window is the same. 2) The value for the window in the TCP header decreases faster than the ACK field increases, meaning the available window goes down and the right edge of the window moves left in sequence space. We're trying to do (1). (2) would be illegal. A good test is to look at all the packets, compute the value of (ACK + WND) and make sure that it always increases or stays the same. This value should never get smaller. If it gets smaller, we have a bug. If it always increases or stays the same, we're fine. The silly window avoidance code tries to make sure that it always increases in jumps of at least 1 MSS, and to do this it deliberately holds the right edge (ACK + WND) the same until it can jump it by 1 MSS. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
