Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2019 19:48:02 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351782 - head/sys/netinet/tcp_stacks
Message-ID:  <201909031948.x83Jm2YN070072@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Sep  3 19:48:02 2019
New Revision: 351782
URL: https://svnweb.freebsd.org/changeset/base/351782

Log:
  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

Modified:
  head/sys/netinet/tcp_stacks/rack.c

Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c	Tue Sep  3 19:42:04 2019	(r351781)
+++ head/sys/netinet/tcp_stacks/rack.c	Tue Sep  3 19:48:02 2019	(r351782)
@@ -1790,6 +1790,11 @@ rack_drop_checks(struct tcpopt *to, struct mbuf *m, st
 			 */
 			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 tc
 	}
 	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) ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909031948.x83Jm2YN070072>