Home
Inibo E. Exibo
inibo
......: ..: ..:: ...

July 2009
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Inibo E. Exibo [userpic]
More Geek humor

From /usr/src/linux/net/ipv4/tcp_timer.c

 
        if (tcp_retransmit_skb(sk, skb_peek(&sk->write_queue)) > 0) {
                /* Retransmission failed because of local congestion,
                 * do not backoff.
                 */
                if (!tp->retransmits)
                        tp->retransmits=1;
                tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS,
                                     min(tp->rto, TCP_RESOURCE_PROBE_INTERVAL));
                goto out;
        }

        /* Increase the timeout each time we retransmit.  Note that
         * we do not increase the rtt estimate.  rto is initialized
         * from rtt, but increases here.  Jacobson (SIGCOMM 88) suggests
         * that doubling rto each time is the least we can get away with.
         * In KA9Q, Karn uses this for the first few times, and then
         * goes to quadratic.  netBSD doubles, but only goes up to *64,
         * and clamps at 1 to 64 sec afterwards.  Note that 120 sec is
         * defined in the protocol as the maximum possible RTT.  I guess
         * we'll have to use something other than TCP to talk to the 
         * University of Mars.
         *
         * PAWS allows us longer timeouts and large windows, so once
         * implemented ftp to mars will work nicely. We will have to fix
         * the 120 second clamps though!  
         */
 
        tp->backoff++;
        tp->retransmits++;