summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2018-05-08 15:10:33 +0000
committerbluhm <bluhm@openbsd.org>2018-05-08 15:10:33 +0000
commit5bcca80f6ba5818c8657351412841c1d1c8fb854 (patch)
tree6e9ff4c0a738c2c2681b57994eb0abf3624ae302 /sys/netinet/tcp_output.c
parentSocket splicing can delay operations by task or timeout. Introduce (diff)
downloadwireguard-openbsd-5bcca80f6ba5818c8657351412841c1d1c8fb854.tar.xz
wireguard-openbsd-5bcca80f6ba5818c8657351412841c1d1c8fb854.zip
Historically there were slow and fast tcp timeouts. That is why
the delack timer had a different implementation. Use the same mechanism for all TCP timer. OK mpi@ visa@
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 2e34e0ef949..3a18b29238f 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.123 2017/10/25 12:38:21 job Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.124 2018/05/08 15:10:33 bluhm Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1089,8 +1089,8 @@ out:
}
/* Restart the delayed ACK timer, if necessary. */
- if (tp->t_flags & TF_DELACK)
- TCP_RESTART_DELACK(tp);
+ if (TCP_TIMER_ISARMED(tp, TCPT_DELACK))
+ TCP_TIMER_ARM_MSEC(tp, TCPT_DELACK, tcp_delack_msecs);
return (error);
}
@@ -1099,7 +1099,7 @@ out:
tp->t_pmtud_mtu_sent = packetlen;
tcpstat_inc(tcps_sndtotal);
- if (tp->t_flags & TF_DELACK)
+ if (TCP_TIMER_ISARMED(tp, TCPT_DELACK))
tcpstat_inc(tcps_delack);
/*
@@ -1112,7 +1112,7 @@ out:
tp->rcv_adv = tp->rcv_nxt + win;
tp->last_ack_sent = tp->rcv_nxt;
tp->t_flags &= ~TF_ACKNOW;
- TCP_CLEAR_DELACK(tp);
+ TCP_TIMER_DISARM(tp, TCPT_DELACK);
if (sendalot && --maxburst)
goto again;
return (0);