DragonFly BSD
DragonFly bugs List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: panic in TCP Limited Transmit after RTO


From: Jeffrey Hsu <hsu@xxxxxxxxxxxxxxxx>
Date: Sat, 12 Mar 2005 14:39:53 -0800

Limited Transmit is supposed to send new data, and, we are out of SACK recovery at this point, so I think we can safely ignore any old SACK blocks. Please try this patch.

Index: tcp_input.c
===================================================================
RCS file: /j/dragonfly/dcvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.54
diff -u -p -r1.54 tcp_input.c
--- tcp_input.c	9 Mar 2005 06:57:29 -0000	1.54
+++ tcp_input.c	12 Mar 2005 22:28:35 -0000
@@ -1954,9 +1954,10 @@ fastretransmit:
 					    (tp->t_dupacks - tp->snd_limited);
 			} else if (tcp_do_limitedtransmit) {
 				u_long oldcwnd = tp->snd_cwnd;
-				tcp_seq oldsndmax = tp->snd_max;
+				u_long oldssthresh = tp->snd_ssthresh;
+				tcp_seq oldsndnxt = tp->snd_nxt;
 				/* outstanding data */
-				uint32_t ownd = tp->snd_max - tp->snd_una;
+				uint32_t ownd = tp->snd_nxt - tp->snd_una;
 				u_int sent;
 
 #define	iceildiv(n, d)		(((n)+(d)-1) / (d))
@@ -1969,9 +1970,11 @@ fastretransmit:
 				tp->snd_cwnd = ownd +
 				    (tp->t_dupacks - tp->snd_limited) *
 				    tp->t_maxseg;
+				tp->snd_ssthresh = tp->snd_cwnd;
 				tcp_output(tp);
 				tp->snd_cwnd = oldcwnd;
-				sent = tp->snd_max - oldsndmax;
+				tp->snd_ssthresh = oldssthresh;
+				sent = tp->snd_nxt - oldsndnxt;
 				if (sent > tp->t_maxseg) {
 					KASSERT((tp->t_dupacks == 2 &&
 						 tp->snd_limited == 0) ||
Index: tcp_output.c
===================================================================
RCS file: /j/dragonfly/dcvs/src/sys/netinet/tcp_output.c,v
retrieving revision 1.25
diff -u -p -r1.25 tcp_output.c
--- tcp_output.c	9 Mar 2005 06:54:34 -0000	1.25
+++ tcp_output.c	12 Mar 2005 22:23:00 -0000
@@ -193,13 +193,13 @@ tcp_output(tp)
 	else
 		tp->t_flags &= ~TF_LASTIDLE;
 
-	if (TCP_DO_SACK(tp) && tp->snd_nxt != tp->snd_max &&
+	if (TCP_DO_SACK(tp) && (tp->snd_cwnd < tp->snd_ssthresh) &&
 	    !IN_FASTRECOVERY(tp))
 		nsacked = tcp_sack_bytes_below(&tp->scb, tp->snd_nxt);
 
 again:
 	/* Make use of SACK information when slow-starting after a RTO. */
-	if (TCP_DO_SACK(tp) && tp->snd_nxt != tp->snd_max &&
+	if (TCP_DO_SACK(tp) && (tp->snd_cwnd < tp->snd_ssthresh) &&
 	    !IN_FASTRECOVERY(tp)) {
 		tcp_seq old_snd_nxt = tp->snd_nxt;
 


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