[Sumover-dev] [svn commit] r4763 - vic/branches/cc/cc

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Wed Apr 7 01:23:34 BST 2010


Author: soohyunc
Date: Wed Apr  7 01:23:34 2010
New Revision: 4763

Modified:
   vic/branches/cc/cc/tfwc_sndr.cpp
   vic/branches/cc/cc/tfwc_sndr.h

Log:
Subsequent to the Revision 4762... (to prevent from segfault)

had to consider all re-ordering cases (e.g., packet reordering, ack reordering,
depricated ack reception)

i.e., if the above cases occurred before we see the first packet loss, then we
do not have any history to go back. therefore, we increase cwnd to clock a
packet out.



Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp	Wed Apr  7 01:23:34 2010
@@ -233,7 +233,7 @@
 		  // so revert to the eariler history
 		  revert = revert_interval(jacked_);
 		  // then, update cwnd
-		  cwnd_in_packets(revert);
+		  window_in_packets(revert);
 		  print_cwnd();
 		  // finally, reset variables
 		  reset_var(revert);
@@ -244,12 +244,13 @@
 		//
 		else if(out_of_ack(jacked_, seqvec_, num_seqvec_)) {
 		  debug_msg("warning: this ack(%d) itself is out-of-order!\n",jacked_);
+		  if(!is_tfwc_on_)
 		  // if the disorder is beyond 3 dupack rule,
 		  // revert to the earlier history
 		  if(shift >= DUPACKS)
 		  revert = revert_interval(jacked_);
 		  // then, update cwnd
-		  cwnd_in_packets(revert);
+		  window_in_packets(revert);
 		  print_cwnd();
 		  // finally, reset variables
 		  reset_var(revert);
@@ -308,25 +309,20 @@
 	// by inserting "jacked" to the previous ackvec.
 	// finally, we only need to clock packets out.
 	// (i.e., do NOT update cwnd and RTT)
-	if(reorder_ && is_tfwc_on_) {
+	if(reorder_) {
 		// revert to the earlier history if the disorder is beyond 3 dupack rule
 		if (shift >= DUPACKS)
 		revert = revert_interval(jacked_);
 		// then, update cwnd
-		cwnd_in_packets(revert);
+		window_in_packets(revert);
 		print_cwnd();
 		// finally, reset variables
 		reset_var(revert);
 		return;
 	}
 
-	// TFWC is not turned on (i.e., no packet loss yet)
-	if(!is_tfwc_on_) 
-		tcp_like_increase();
-	// TFWC is turned on, so compute congestion window
-	else
-		cwnd_in_packets(revert);
-
+	// TFWC congestion window in packets
+	window_in_packets(revert);
 	print_cwnd();
 
 	// set ackofack (real number)
@@ -366,6 +362,18 @@
 }
 
 /*
+ * TFWC congestion window in packets
+ */
+void TfwcSndr::window_in_packets(bool revert) {
+	// TFWC is not turned on (i.e., no packet loss yet)
+	if(!is_tfwc_on_) 
+		tcp_like_increase();
+	// TFWC is turned on, so compute congestion window
+	else
+		cwnd_in_packets(revert);
+} 
+
+/*
  * detect out-of-ordered ack delivery
  * -- if just ack'ed seqno (jack) is already in sequence vector,
  *    then, this ack should've been arrived earlier.

Modified: vic/branches/cc/cc/tfwc_sndr.h
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.h	(original)
+++ vic/branches/cc/cc/tfwc_sndr.h	Wed Apr  7 01:23:34 2010
@@ -186,9 +186,11 @@
 	// (to capture the very first lost packet loss)
 	bool detect_loss();
 
-	// TFWC congestion window
-	void cwnd_in_bytes();
+	// TFWC congestion window in packets
+	void window_in_packets(bool revert);
 	void cwnd_in_packets(bool revert);
+	// TFWC congestion window in bytes
+	void cwnd_in_bytes();
 
 	// calcuate average loss interval
 	void avg_loss_interval();



More information about the Sumover-dev mailing list