Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 21:58:38 +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: r328066 - head/sys/netinet
Message-ID:  <201801162158.w0GLwcep090664@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Jan 16 21:58:38 2018
New Revision: 328066
URL: https://svnweb.freebsd.org/changeset/base/328066

Log:
  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.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Tue Jan 16 21:43:57 2018	(r328065)
+++ head/sys/netinet/sctp_indata.c	Tue Jan 16 21:58:38 2018	(r328066)
@@ -3364,7 +3364,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;
 		}
@@ -3388,8 +3389,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
@@ -3674,7 +3677,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? */
@@ -4603,6 +4606,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) {
@@ -4728,16 +4738,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?201801162158.w0GLwcep090664>