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

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Mar 4 15:12:36 GMT 2010


Author: soohyunc
Date: Thu Mar  4 15:12:36 2010
New Revision: 4668

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

Log:
-- added packet reordering detection mechanism.
   (just detection only, i.e., no action)



Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp	Thu Mar  4 15:12:36 2010
@@ -125,6 +125,8 @@
 	rttvar_exp_ = 2;
 	t_srtt_ = int(srtt_init_/tcp_tick_) << T_SRTT_BITS;
 	t_rttvar_ = int(rttvar_init_/tcp_tick_) << T_RTTVAR_BITS;
+
+	prevno_ = -1;
 }
 
 void TfwcSndr::tfwc_sndr_send(int seqno, double now, double offset) {
@@ -177,6 +179,8 @@
 		// just acked seqno 
 		// i.e.,) head seqno(= highest seqno) of this ackvec
 		jacked_ = ends_ - 1;
+		if (jacked_ < prevno_)
+		debug_msg("warning: packet reordering occurred!\n");
 
 		// declared AckVec
 		ackv_ = (u_int16_t *) malloc (sizeof(u_int16_t) * num_vec_);

Modified: vic/branches/cc/cc/tfwc_sndr.h
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.h	(original)
+++ vic/branches/cc/cc/tfwc_sndr.h	Thu Mar  4 15:12:36 2010
@@ -132,6 +132,7 @@
 	// init variables
 	inline void init_var() {
 		num_missing_ = 0;
+		prevno_ = jacked_;
 	}
 
 	// get the first position in ackvec where 1 is marked
@@ -325,6 +326,9 @@
 	int rttvar_exp_;	// exponent of multiple for t0_
 	double t0_;		// t0 value at TCP throughput equation
 	double tcp_tick_;
+
+	// other variables
+	u_int16_t prevno_;	// previous highest packet sequence number
 };
 
 #endif



More information about the Sumover-dev mailing list