patch-2.2.0-pre8 linux/net/ipv4/tcp_output.c

Next file: linux/net/ipv6/addrconf.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.98 1998/12/12 06:43:35 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.100 1999/01/16 08:31:06 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -49,7 +49,7 @@
 
 	tp->delayed_acks = 0;
 	if(tcp_in_quickack_mode(tp))
-		tp->ato = ((HZ/100)*2);
+		tcp_exit_quickack_mode(tp);
 	tcp_clear_xmit_timer(sk, TIME_DACK);
 }
 
@@ -99,7 +99,7 @@
 			}
 			if(sysctl_tcp_sack) {
 				sysctl_flags |= SYSCTL_FLAG_SACK;
-				if(!sysctl_tcp_timestamps)
+				if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))
 					tcp_header_size += TCPOLEN_SACKPERM_ALIGNED;
 			}
 		} else if(tp->sack_ok && tp->num_sacks) {
@@ -997,7 +997,13 @@
 			 * (ACK is unreliable) but it's much better use of
 			 * bandwidth on slow links to send a spare ack than
 			 * resend packets.
+			 *
+			 * This is the one possible way that we can delay an
+			 * ACK and have tp->ato indicate that we are in
+			 * quick ack mode, so clear it.
 			 */
+			if(tcp_in_quickack_mode(tp))
+				tcp_exit_quickack_mode(tp);
 			tcp_send_delayed_ack(tp, HZ/2);
 			return;
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov