Some of it is also, the difference between the way we prepacketize
for TCP, and BSD does not. I happened to be staring at the BSD
code for other reasons tonight (to double check the RFC conformance
of our retransmission algorithm), and I realized that we have
a lot of special case code that just does not exist in BSD.
There's just that one giant output routine that does it all,
but this relies heavily on the way output packets are decoupled
from the transmission queue in BSD.
I think we will need to accept a slightly larger size, even
after we clean things up and optimize, if only because of the
prepacketizing. On the other hand, I still think the speed gain
is worth it.
Also, there is a lot of special case code that is accumulated
cruft due to trying to do retransmissions the wrong way.
After some discussion with Vern Paxon I now realize that
the retransmission code can still be simplified a lot.
As an aside, the retransmission code is wrong in both
the 2.0.x code and the 2.1.x code. There are some minor
problems in the 2.0.x code that Vern has pointed out to me,
and which I will fix shortly, and there is a slightly more
serious problem in the 2.0.x code that I probably won't fix
because fixing it would be a major operation, and the failure
only makes our TCP stack more conservative than BSD.
The 2.1.x retransmission code is in worse shape and has to be
rewritten, since it doesn't follow the RFCs at all.
(Although it is again more conservative than what the RFCs
describe.)
-- Eric Schenk www: http://www.dna.lth.se/~erics Dept. of Comp. Sci., Lund University email: Eric.Schenk@dna.lth.se Box 118, S-221 00 LUND, Sweden fax: +46-46 13 10 21 ph: +46-46 222 96 38