[Sumover-dev] [svn commit] r4728 - in vic/branches/cc: rtp
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Mar 26 17:03:45 GMT 2010
Author: soohyunc
Date: Fri Mar 26 17:03:45 2010
New Revision: 4728
Modified:
vic/branches/cc/cc/tfwc_sndr.cpp
vic/branches/cc/cc/tfwc_sndr.h
vic/branches/cc/rtp/transmitter.cpp
vic/branches/cc/rtp/transmitter.h
Log:
o Packet/AckVec re-ordering
when the sender received a deprecated ack (out of 3 dupack range), then do
nothing but trigger send packets out to keep the Jacob's packet conservative
rule.
when the sender received a re-ordered ack, then do nothing but trigger send
packets out as the above.
o trim TfwcSndr and Transmitter
only need to pass ts_off_ once at the very beginning.
Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp (original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp Fri Mar 26 17:03:45 2010
@@ -133,12 +133,13 @@
__jacked_ = 0;
}
-void TfwcSndr::tfwc_sndr_send(int seqno, double now, double offset) {
+void TfwcSndr::tfwc_sndr_send(int seqno, double now) {
+ if(seqno_ == 0)
+ ts_off_ = tx_ts_offset();
// parse seqno and mark timestamp for this data packet
seqno_ = seqno;
now_ = now;
- ts_off_ = offset;
// timestamp vector for loss history update
tsvec_[seqno_%TSZ] = now_;
@@ -206,21 +207,20 @@
if (jacked_ < __jacked_) {
// this ack is deprecated message (e.g., too old).
if(jacked_ < aoa_) {
- debug_msg("warning: this ack(%d) is older than AoA(%d)!\n",jacked_,aoa_);
+ debug_msg("warning: this ack(%d) is older than AoA(%d)!\n", jacked_,aoa_);
+ // trigger packets out to keep Jacob's packet conservation rule
+ cc_tfwc_output();
return;
}
// this ack is delivered out-of-order
else if(out_of_ack(jacked_, seqvec_, num_seqvec_)) {
debug_msg("warning: this ack(%d) itself is out-of-order!\n",jacked_);
outofack = true;
- // cwnd process
- if(is_tfwc_on_) control();
- else cwnd_++;
- // update RTT using previously sampled RTT
- update_rtt(tao_);
+ // trigger packets out to keep Jacob's packet conservation rule
+ cc_tfwc_output();
return;
}
- // packet is out-of-order
+ // packet is out-of-order, so adjust ackvec re-construction
else {
debug_msg("warning: packet reordering occurred!\n");
// replace just ack'ed seqno
@@ -285,11 +285,12 @@
// set ackofack (real number)
aoa_ = ackofack();
+ if(!reorder) {
// sampled RTT
- if(!reorder)
tao_ = so_recv_ - tsvec_[jacked_%TSZ];
// update RTT with the sampled RTT
update_rtt(tao_);
+ }
// is TFWC being driven by timeout mechanism?
if(to_driven_ && is_tfwc_on_)
@@ -334,7 +335,9 @@
}
void TfwcSndr::reset_var() {
+ // init vars------------*
num_missing_ = 0;
+ //----------------------*
// store jack'ed
store(jacked_);
Modified: vic/branches/cc/cc/tfwc_sndr.h
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.h (original)
+++ vic/branches/cc/cc/tfwc_sndr.h Fri Mar 26 17:03:45 2010
@@ -79,9 +79,10 @@
virtual ~TfwcSndr() {};
virtual void cc_tfwc_output() = 0;
+ virtual double tx_ts_offset() = 0;
// parse seqno and timestamp
- void tfwc_sndr_send(int, double, double);
+ void tfwc_sndr_send(int, double);
// main reception path (XR packet)
void tfwc_sndr_recv(u_int16_t type, u_int16_t begin, u_int16_t end,
Modified: vic/branches/cc/rtp/transmitter.cpp
==============================================================================
--- vic/branches/cc/rtp/transmitter.cpp (original)
+++ vic/branches/cc/rtp/transmitter.cpp Fri Mar 26 17:03:45 2010
@@ -327,13 +327,9 @@
if (ntohs(rh->rh_seqno) <= magic + jack) {
// record seqno and timestamp at TfwcSndr side
- tfwc_sndr_send(ntohs(rh->rh_seqno),
- tx_now()-tx_now_offset_,
- tx_now_offset_);
-
+ tfwc_sndr_send(ntohs(rh->rh_seqno), tx_now()-tx_now_offset_);
// move head pointer
head_ = pb->next;
-
// call Transmitter::output_data_only(pb)
output_data_only(pb);
}
@@ -381,13 +377,9 @@
// while packet seqno is within "cwnd + jack", send that packet
while (ntohs(rh->rh_seqno) <= magic + jack) {
// record seqno and timestamp at TfwcSndr side
- tfwc_sndr_send(ntohs(rh->rh_seqno),
- tx_now()-tx_now_offset_,
- tx_now_offset_);
-
+ tfwc_sndr_send(ntohs(rh->rh_seqno), tx_now()-tx_now_offset_);
// move head pointer
head_ = pb->next;
-
// call Transmitter::output(pb)
output(pb);
Modified: vic/branches/cc/rtp/transmitter.h
==============================================================================
--- vic/branches/cc/rtp/transmitter.h (original)
+++ vic/branches/cc/rtp/transmitter.h Fri Mar 26 17:03:45 2010
@@ -107,6 +107,7 @@
return ((double) tv.tv_sec + 1e-6 * (double) tv.tv_usec);
}
double tx_now_offset_;
+ virtual inline double tx_ts_offset() { return (tx_now_offset_); }
// Tx pktbuf size
int tx_buf_size();
More information about the Sumover-dev
mailing list