patch-2.1.92 linux/net/ipv4/tcp_timer.c
Next file: linux/net/ipv6/af_inet6.c
Previous file: linux/net/ipv4/tcp_output.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Wed Apr 1 16:19:57 1998
- Orig file:
v2.1.91/linux/net/ipv4/tcp_timer.c
- Orig date:
Thu Mar 26 15:57:13 1998
diff -u --recursive --new-file v2.1.91/linux/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_timer.c,v 1.43 1998/03/22 22:10:28 davem Exp $
+ * Version: $Id: tcp_timer.c,v 1.45 1998/03/30 08:41:31 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -362,13 +362,17 @@
*/
if(tp->sack_ok) {
struct sk_buff *skb = skb_peek(&sk->write_queue);
+ __u8 toclear = TCPCB_SACKED_ACKED;
+ if(tp->retransmits == 0)
+ toclear |= TCPCB_SACKED_RETRANS;
while((skb != NULL) &&
(skb != tp->send_head) &&
(skb != (struct sk_buff *)&sk->write_queue)) {
- TCP_SKB_CB(skb)->sacked = 0;
+ TCP_SKB_CB(skb)->sacked &= ~(toclear);
skb = skb->next;
}
+ tp->fackets_out = 0;
}
/* Retransmission. */
@@ -377,9 +381,9 @@
/* remember window where we lost
* "one half of the current window but at least 2 segments"
*/
- tp->snd_ssthresh = max(tp->snd_cwnd >> 1, 2);
- tp->snd_cwnd_cnt = 0;
- tp->snd_cwnd = 1;
+ tp->retrans_out = 0;
+ tp->snd_ssthresh = max(tp->snd_cwnd >> (1 + TCP_CWND_SHIFT), 2);
+ tp->snd_cwnd = (1 << TCP_CWND_SHIFT);
}
tp->retransmits++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov