Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2018 20:39:09 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332234 - stable/11/sys/netinet
Message-ID:  <201804072039.w37Kd9pv094020@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Apr  7 20:39:09 2018
New Revision: 332234
URL: https://svnweb.freebsd.org/changeset/base/332234

Log:
  MFC r328066:
  
  Fix a bug related to fast retransmissions.
  
  When processing a SACK advancing the cumtsn-ack in fast recovery,
  increment the miss-indications for all TSN's reported as missing.
  
  Thanks to Fabian Ising for finding the bug and to Timo Voelker
  for provinding a fix.
  
  This fix moves also CMT related initialisation of some variables
  to a more appropriate place.

Modified:
  stable/11/sys/netinet/sctp_indata.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_indata.c
==============================================================================
--- stable/11/sys/netinet/sctp_indata.c	Sat Apr  7 20:38:01 2018	(r332233)
+++ stable/11/sys/netinet/sctp_indata.c	Sat Apr  7 20:39:09 2018	(r332234)
@@ -3362,7 +3362,8 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru
 				}
 			}
 		}
-		if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->this_sack_highest_gap)) {
+		if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->this_sack_highest_gap) &&
+		    !(accum_moved && asoc->fast_retran_loss_recovery)) {
 			/* we are beyond the tsn in the sack  */
 			break;
 		}
@@ -3386,8 +3387,10 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru
 			 * FR using this SACK.
 			 */
 			continue;
-		} else if (tp1->whoTo && SCTP_TSN_GT(tp1->rec.data.tsn,
-		    tp1->whoTo->this_sack_highest_newack)) {
+		} else if (tp1->whoTo &&
+			    SCTP_TSN_GT(tp1->rec.data.tsn,
+			    tp1->whoTo->this_sack_highest_newack) &&
+		    !(accum_moved && asoc->fast_retran_loss_recovery)) {
 			/*
 			 * CMT: New acks were receieved for data sent to
 			 * this dest. But no new acks were seen for data
@@ -3672,7 +3675,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, stru
 					tp1->whoTo->find_pseudo_cumack = 1;
 					tp1->whoTo->find_rtx_pseudo_cumack = 1;
 				}
-			} else {/* CMT is OFF */
+			} else {	/* CMT is OFF */
 
 #ifdef SCTP_FR_TO_ALTERNATE
 				/* Can we find an alternate? */
@@ -4601,6 +4604,13 @@ hopeless_peer:
 		if (stcb->asoc.cc_functions.sctp_cwnd_prepare_net_for_sack) {
 			(*stcb->asoc.cc_functions.sctp_cwnd_prepare_net_for_sack) (stcb, net);
 		}
+		/*
+		 * CMT: SFR algo (and HTNA) - this_sack_highest_newack has
+		 * to be greater than the cumack. Also reset saw_newack to 0
+		 * for all dests.
+		 */
+		net->saw_newack = 0;
+		net->this_sack_highest_newack = last_tsn;
 	}
 	/* process the new consecutive TSN first */
 	TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
@@ -4726,16 +4736,6 @@ hopeless_peer:
 	asoc->this_sack_highest_gap = last_tsn;
 
 	if ((num_seg > 0) || (num_nr_seg > 0)) {
-
-		/*
-		 * CMT: SFR algo (and HTNA) - this_sack_highest_newack has
-		 * to be greater than the cumack. Also reset saw_newack to 0
-		 * for all dests.
-		 */
-		TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
-			net->saw_newack = 0;
-			net->this_sack_highest_newack = last_tsn;
-		}
 
 		/*
 		 * thisSackHighestGap will increase while handling NEW



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