tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BSD doesn't track window size changes correctly.



I was thinking in a similar way, but what I think I'd do to
fix this is get rid of the concept of storing the peer's window
size as advertised - that's a meaningless number, and is only
carried in the packet as it is to save bytes.

What the implementation should be tracking is the actual window,
that is, the begin & end sequence numbers of the window, rather
than its size.  We have the begin - that's the ack point.  What's
needed is to keep the far end of the window (whether the last in,
or first not in, whichever makes for the simpler implementation)
and do away with the window size field (tp->snd_win).   If knowing
the max window size (tp->max_sndwnd) is actually useful for something
(aside from reporting, I can't really imagine what) it can be
retained, otherwise it could go too.

Then the problem as you analysed it would not have happened - if the
ack moves forward, then so does the front edge of the window (and
the window becomes smaller without adjusting anything else).
If we choose to use the window size value, then we move the far
edge of the window (usually forwards, but potentially backwards)
independantly of whatever happened to the front edge.

kre



Home | Main Index | Thread Index | Old Index