I'm looking for a TCP/IP guru that could explain the way Linux (2.0.x)
handles TCP and its retransmissions mechanisms.
There has recently been a debate here in EA (in a list dealing with
Ham TCP/IP) about whether Linux used the IRTT value at all or not, as
there were several people having trouble with it. Investigation has
shown it is being used.... only for the TCP connection phase. I mean,
if I set IRTT to, say, 5 sec, the retransmission timeouts (RTO) are 5,
10, 20, etc as they should (due to back-off), but as soon as I get the
SYN ACK from the other end, RTO automagically goes back to 3 sec (RFC
1122 initial value), no matter what RTO was before.
Looking through the code (/usr/src/linux/net/ipv4/tcp_input.c, line
1685) I see the following (same code up to 2.0.36-pre6):
/* Reset the RTT estimator to the initial
* state rather than testing to avoid
* updating it on the ACK to the SYN packet.
*/
sk->rtt = 0;
sk->rto = TCP_TIMEOUT_INIT;
sk->mdev = TCP_TIMEOUT_INIT;
So the question is, is this the right behaviour? Should we use the
IRTT value the user set for the route? I'm no expert at all, but since
the comment for the function this code is in says:
/*
* This routine deals with incoming acks, but not outgoing ones.
*
* This routine is totally _WRONG_. The list structuring is wrong,
* the algorithm is wrong, the code is wrong.
*/
I thought I could ask for help here. So what do you think?
73's EB2EBU.
-- izhzz.fdyjlk@i-tech.com http://web.jet.es/inaki.arenaza/ PGP Key available at http://web.jet.es/inaki.arenaza/pgpkey.html