summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-03-01 22:29:30 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-03-01 22:29:30 +0000
commit88eb9e205f021f67565cdcb0ed25974c3892e780 (patch)
tree0a9143f884ca32a8fcb4448b4137c8c3a36dc306 /sys/netinet/tcp_output.c
parent7654fe675bb68865e2eec2bec559901d94dc31ea (diff)
remove tcp_fasttimo and convert delayed acks to the timeout(9) API instead.
adapated from netbsd. okay angelos@
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index b46f70a499c..83b71bf0058 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.47 2002/02/05 17:03:11 provos Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.48 2002/03/01 22:29:29 provos Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1107,9 +1107,16 @@ out:
tp->t_softerror = error;
return (0);
}
+
+ /* Restart the delayed ACK timer, if necessary. */
+ if (tp->t_flags & TF_DELACK)
+ TCP_RESTART_DELACK(tp);
+
return (error);
}
tcpstat.tcps_sndtotal++;
+ if (tp->t_flags & TF_DELACK)
+ tcpstat.tcps_delack++;
/*
* Data sent (as far as we can tell).
@@ -1120,7 +1127,8 @@ out:
if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv))
tp->rcv_adv = tp->rcv_nxt + win;
tp->last_ack_sent = tp->rcv_nxt;
- tp->t_flags &= ~(TF_ACKNOW|TF_DELACK);
+ tp->t_flags &= ~TF_ACKNOW;
+ TCP_CLEAR_DELACK(tp);
#if defined(TCP_SACK)
if (sendalot && --maxburst)
#else