A correctly implemented TCP stack will keep sending packets as long as there is free space in the window. If the existing code refuses to send more packets because there is SOME unacknowledged data, but enough room in the window to send more, then it is broken.
The entire point of having a window is so that the sender can send multiple packets before the first is ACK'd. Are you sure that the existing code refuses to send even when the window should allow it? Or is the window just too small? If so, are you sure it came directly from the bsd stack? I can not believe that both are true.
Ge van Geldorp wrote:
Although I understand what's wrong, I have a bit of difficulty trying to figure out how to fix it. Attached is a proposed fix, which basically attacks the problem at the sending end by removing the check if the connection is idle or not. With that fix the loop.c program works as I expect and http://www.reactos.org loads in a much more reasonable 2-3 sec in ibrowser. The problem that I have with the fix is that it's a change in code we borrowed from the BSD stack. I can hardly imagine that a piece of software so heavily used as the BSD stack would have such a fundamental problem.
Any thoughts?
GvG