Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3073)

Unified Diff: src/internet/model/tcp-prr-recovery.cc

Issue 342270043: TCP rate sample
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/internet/model/tcp-prr-recovery.h ('k') | src/internet/model/tcp-rate-ops.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/internet/model/tcp-prr-recovery.cc
===================================================================
--- a/src/internet/model/tcp-prr-recovery.cc
+++ b/src/internet/model/tcp-prr-recovery.cc
@@ -22,7 +22,6 @@
*/
#include "tcp-prr-recovery.h"
-#include "ns3/tcp-socket-base.h"
#include "ns3/tcp-congestion-ops.h"
#include "ns3/log.h"
@@ -58,7 +57,6 @@
m_prrDelivered (recovery.m_prrDelivered),
m_prrOut (recovery.m_prrOut),
m_recoveryFlightSize (recovery.m_recoveryFlightSize),
- m_previousSackedBytes (recovery.m_previousSackedBytes),
m_reductionBoundMode (recovery.m_reductionBoundMode)
{
NS_LOG_FUNCTION (this);
@@ -71,29 +69,23 @@
void
TcpPrrRecovery::EnterRecovery (Ptr<TcpSocketState> tcb, uint32_t dupAckCount,
- uint32_t unAckDataCount, uint32_t lastSackedBytes)
+ uint32_t unAckDataCount, uint32_t deliveredBytes)
{
- NS_LOG_FUNCTION (this << tcb << dupAckCount << unAckDataCount << lastSackedBytes);
+ NS_LOG_FUNCTION (this << tcb << dupAckCount << unAckDataCount);
NS_UNUSED (dupAckCount);
m_prrOut = 0;
m_prrDelivered = 0;
m_recoveryFlightSize = unAckDataCount;
- m_previousSackedBytes = lastSackedBytes;
- DoRecovery (tcb, 0, lastSackedBytes);
+ DoRecovery (tcb, deliveredBytes);
}
void
-TcpPrrRecovery::DoRecovery (Ptr<TcpSocketState> tcb, uint32_t lastAckedBytes,
- uint32_t lastSackedBytes)
+TcpPrrRecovery::DoRecovery (Ptr<TcpSocketState> tcb, uint32_t deliveredBytes)
{
- NS_LOG_FUNCTION (this << tcb << lastAckedBytes << lastSackedBytes);
- uint32_t lastDeliveredBytes;
- int changeInSackedBytes = int (lastSackedBytes - m_previousSackedBytes);
- lastDeliveredBytes = lastAckedBytes + changeInSackedBytes > 0 ? lastAckedBytes + changeInSackedBytes : 0;
- m_previousSackedBytes = lastSackedBytes;
- m_prrDelivered += lastDeliveredBytes;
+ NS_LOG_FUNCTION (this << tcb << deliveredBytes);
+ m_prrDelivered += deliveredBytes;
int sendCount;
if (tcb->m_bytesInFlight > tcb->m_ssThresh)
@@ -109,7 +101,7 @@
}
else if (m_reductionBoundMode == SSRB)
{
- limit = std::max (m_prrDelivered - m_prrOut, lastDeliveredBytes) + tcb->m_segmentSize;
+ limit = std::max (m_prrDelivered - m_prrOut, deliveredBytes) + tcb->m_segmentSize;
}
sendCount = std::min (limit, static_cast<int> (tcb->m_ssThresh - tcb->m_bytesInFlight));
}
« no previous file with comments | « src/internet/model/tcp-prr-recovery.h ('k') | src/internet/model/tcp-rate-ops.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b