aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2019-09-03 19:48:02 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2019-09-03 19:48:02 +0000
commit191ae5bfa99f9b639657a8d7845e4b4bcf33ece8 (patch)
tree79872d50aa717c88220e3e5d42925f4b8e1b780b
parent59e50df3cd1493537cfa916daf3c51a01b7ff06e (diff)
downloadsrc-191ae5bfa99f9b639657a8d7845e4b4bcf33ece8.tar.gz
src-191ae5bfa99f9b639657a8d7845e4b4bcf33ece8.zip
Fix two TCP RACK issues:
* Convert the TCP delayed ACK timer from ms to ticks as required. This fixes the timer on platforms with hz != 1000. * Don't delay acknowledgements which report duplicate data using DSACKs. Reviewed by: rrs@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D21512
Notes
Notes: svn path=/head/; revision=351782
-rw-r--r--sys/netinet/tcp_stacks/rack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 1f0aebe9f893..39f81a2f5d26 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -1790,6 +1790,11 @@ rack_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, struct tc
*/
tcp_update_sack_list(tp, th->th_seq,
th->th_seq + todrop);
+ /*
+ * ACK now, as the next in-sequence segment
+ * will clear the DSACK block again
+ */
+ tp->t_flags |= TF_ACKNOW;
}
*drop_hdrlen += todrop; /* drop from the top afterwards */
th->th_seq += todrop;
@@ -2338,7 +2343,7 @@ rack_start_hpts_timer(struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts, int
}
hpts_timeout = rack_timer_start(tp, rack, cts);
if (tp->t_flags & TF_DELACK) {
- delayed_ack = tcp_delacktime;
+ delayed_ack = TICKS_2_MSEC(tcp_delacktime);
rack->r_ctl.rc_hpts_flags |= PACE_TMR_DELACK;
}
if (delayed_ack && ((hpts_timeout == 0) ||