svn commit: r362225 - head/sys/netinet/tcp_stacks

Randall Stewart rrs at FreeBSD.org
Tue Jun 16 12:26:24 UTC 2020


Author: rrs
Date: Tue Jun 16 12:26:23 2020
New Revision: 362225
URL: https://svnweb.freebsd.org/changeset/base/362225

Log:
  So it turns out rack has a shortcoming in dup-ack counting. It counts the dupacks but
  then does not properly respond to them. This is because a few missing bits are not present.
  BBR actually does properly respond (though it also sends a TLP which is interesting and
  maybe something to fix)..
  
  Sponsored by:	Netflix Inc.
  Differential Revision:	https://reviews.freebsd.org/D25294

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

Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c	Tue Jun 16 12:21:55 2020	(r362224)
+++ head/sys/netinet/tcp_stacks/rack.c	Tue Jun 16 12:26:23 2020	(r362225)
@@ -4588,7 +4588,7 @@ activate_rxt:
 		goto activate_rxt;
 	}
 	/* Convert from ms to usecs */
-	if (rsm->r_flags & RACK_SACK_PASSED) {
+	if ((rsm->r_flags & RACK_SACK_PASSED) || (rsm->r_dupack >= DUP_ACK_THRESHOLD)) {
 		if ((tp->t_flags & TF_SENTFIN) &&
 		    ((tp->snd_max - tp->snd_una) == 1) &&
 		    (rsm->r_flags & RACK_HAS_FIN)) {
@@ -6237,7 +6237,7 @@ rack_log_output(struct tcpcb *tp, struct tcpopt *to, i
 		 * or FIN if seq_out is adding more on and a FIN is present
 		 * (and we are not resending).
 		 */
-		if ((th_flags & TH_SYN) && (seq_out == tp->iss)) 
+		if ((th_flags & TH_SYN) && (seq_out == tp->iss))
 			len++;
 		if (th_flags & TH_FIN)
 			len++;
@@ -8190,6 +8190,7 @@ rack_strike_dupack(struct tcp_rack *rack)
 		rsm->r_dupack++;
 		if (rsm->r_dupack >= DUP_ACK_THRESHOLD) {
 			rack->r_wanted_output = 1;
+			rack->r_timer_override = 1;
 			rack_log_retran_reason(rack, rsm, __LINE__, 1, 3);
 		} else {
 			rack_log_retran_reason(rack, rsm, __LINE__, 0, 3);
@@ -11359,7 +11360,8 @@ check_it:
 	if (rsm->r_flags & RACK_ACKED) {
 		return (NULL);
 	}
-	if ((rsm->r_flags & RACK_SACK_PASSED) == 0) {
+	if (((rsm->r_flags & RACK_SACK_PASSED) == 0) &&
+	    (rsm->r_dupack < DUP_ACK_THRESHOLD)) {
 		/* Its not yet ready */
 		return (NULL);
 	}


More information about the svn-src-all mailing list