.AddAttribute ("Timestamp", "Enable or disable Timestamp option",
BooleanValue (true),
MakeBooleanAccessor (&TcpSocketBase::m_timestampEnabled),
MakeBooleanChecker ())
void
TcpSocketBase::EstimateRtt (const TcpHeader& tcpHeader)
{
Time nextRtt;
if (m_timestampEnabled)
{
nextRtt = TcpOptionTS::ElapsedTimeFromTsValue (m_lastEchoedTime);
}
else
{
// Use m_rtt for the estimation. Note, RTT of duplicated acknowledgement
// (which should be ignored) is handled by m_rtt.
nextRtt = m_rtt->EstimateRttFromSeq (tcpHeader.GetAckNumber () );
}
//nextRtt will be zero for dup acks. Don't want to update lastRtt in that case
//but still needed to do list clearing that is done in EstimateRttFromSeq.
if(nextRtt != Time (0))
{
m_lastRtt = nextRtt;
NS_LOG_FUNCTION(this << m_lastRtt);
}
}
m_rto = m_rtt->RetransmitTimeout ();
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/YR78eyVkg08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Hi tommaso and Zhou,
I don't think there is bug in the code:
look at this piece of line :
at line 297 of rtt-estimator.cc file of ns-3.21
if (temp < m_minRto.ToInteger (Time::MS))
{
temp = m_minRto.ToInteger (Time::MS);
}
so min rto is set as 1 sec and that is why this is there. Please let me know if my understanding is correct
Aniesh
m_rtt->SetCurrentEstimate (nextRtt);
Hi Nat,I don't know if we have enough time for a full refactory, plus the testing.The 1-line patch could work, but it kinda miss the point of having the TimeStamp option. I'd rather feed the RTT estimator with the measured RTT, e.g.,
m_rtt->SetCurrentEstimate (nextRtt);Mind that even the values from TimeStamp option are measures (just like the ones derived from the Ack Rx time), so they can be imprecise, have a variance, change over time and so on.As a consequence, using the "standard" way of smoothing makes sense.
(Red line is the measured RTT in last round, green line is the estimated RTO in next round)
The idea is pretty straightforward: before calculating RTO, first get the measured RTT in last round, than using Measure(Time:time) function update m_variance.
Of course more tests are required to prove that this simple remedy would not cause backfire.
"When an ACK is received that acknowledges new data, restart the retransmission timer so that it will expire after RTO seconds"
Hi Tommaso:A quick fix to this problem is to move m_rto = m_rtt->RetransmitTimeout () from NewAck function to ReceivedAck function, and add m_rtt->Measurement(m_lastRtt) and m_rto = m_rtt->RetransmitTimeout () in front of it.
--
--
--
--
The following files are not added to version control:
patch
upload.py
upload.py~
Are you sure to continue?(y/N) y
Upload server: codereview.appspot.com (change with -s/--server)
Loaded authentication cookies from /home/charles/.codereview_upload_cookies
New issue subject: tcpcompound
Email (login for uploading to codereview.appspot.com) [charles...@gmail.com]: charles...@gmail.com
Password for charles...@gmail.com:
Invalid username or password.