Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2001 09:23:55 -0600
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        Jesper Skriver <jesper@skriver.dk>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, net@freebsd.org
Subject:   Re: ICMP unreachables, take II.
Message-ID:  <20010225092355.W5714@prism.flugsvamp.com>
In-Reply-To: <20010224235618.C57625@skriver.dk>
References:  <20010222185412.E5714@prism.flugsvamp.com> <20010223034952.A6694@skriver.dk> <20010222212044.H5714@prism.flugsvamp.com> <20010223043405.B6694@skriver.dk> <20010223052012.A39613@skriver.dk> <20010224235618.C57625@skriver.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 24, 2001 at 11:56:18PM +0100, Jesper Skriver wrote:
> jesper@tam% time telnet 195.41.23.1
> Trying 195.41.23.1...
> telnet: connect to address 195.41.23.1: No route to host
> telnet: Unable to connect to remote host
> 0.000u 0.020s 0:00.70 2.8%      88+164k 0+0io 12pf+0w
> 
> But that is probably too fast, what if we delay the retransmit by say
> 100ms efter recieving the host unreachable ?

I was thinking of a slightly more generic solution, something like 
the patch below.  This isn't explicitly tied to ICMP unreachables,
though.
--
Jonathan



Index: tcp_timer.c
===================================================================
RCS file: /ncvs/src/sys/netinet/tcp_timer.c,v
retrieving revision 1.39
diff -u -r1.39 tcp_timer.c
--- tcp_timer.c	2000/10/02 15:00:13	1.39
+++ tcp_timer.c	2001/02/25 05:48:00
@@ -153,6 +153,9 @@
 	callout_stop(tp->tt_rexmt);
 }
 
+int	tcp_syn_backoff[TCP_MAXRXTSHIFT + 1] =
+    { 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 64, 64 };
+
 int	tcp_backoff[TCP_MAXRXTSHIFT + 1] =
     { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
 
@@ -393,7 +396,10 @@
 		tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
 	}
 	tcpstat.tcps_rexmttimeo++;
-	rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
+	if (tp->t_state == TCPS_SYN_SENT)
+		rexmt = TCP_REXMTVAL(tp) * tcp_syn_backoff[tp->t_rxtshift];
+	else
+		rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
 	TCPT_RANGESET(tp->t_rxtcur, rexmt,
 		      tp->t_rttmin, TCPTV_REXMTMAX);
 	/*

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010225092355.W5714>