tcp: (fixes #2921) Add min_cwnd variable
This commit is contained in:
@@ -32,6 +32,7 @@ New user-visible features
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- Bug 2921 - tcp: Add min_cwnd variable to LEDBAT
|
||||
- Bug 2911 - aodv: Binary exponential backoff can become unlimited
|
||||
- Bug 2901 - Add CommandLine::Parse (const std::vector<std::string>> args)
|
||||
- Bug 2891 - netanim: dumbbell-animation breaks when RightCount > LeftCount
|
||||
|
||||
@@ -61,6 +61,11 @@ TcpLedbat::GetTypeId (void)
|
||||
MakeEnumAccessor (&TcpLedbat::SetDoSs),
|
||||
MakeEnumChecker (DO_SLOWSTART, "yes",
|
||||
DO_NOT_SLOWSTART, "no"))
|
||||
.AddAttribute ("MIN_CWND",
|
||||
"Minimum cWnd for Ledbat",
|
||||
UintegerValue (2),
|
||||
MakeUintegerAccessor (&TcpLedbat::m_minCwnd),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -93,7 +98,8 @@ TcpLedbat::TcpLedbat (void)
|
||||
m_lastRollover = 0;
|
||||
m_sndCwndCnt = 0;
|
||||
m_flag = LEDBAT_CAN_SS;
|
||||
}
|
||||
m_minCwnd = 2;
|
||||
};
|
||||
|
||||
void TcpLedbat::InitCircBuf (struct OwdCircBuf &buffer)
|
||||
{
|
||||
@@ -116,6 +122,7 @@ TcpLedbat::TcpLedbat (const TcpLedbat& sock)
|
||||
m_lastRollover = sock.m_lastRollover;
|
||||
m_sndCwndCnt = sock.m_sndCwndCnt;
|
||||
m_flag = sock.m_flag;
|
||||
m_minCwnd = sock.m_minCwnd;
|
||||
}
|
||||
|
||||
TcpLedbat::~TcpLedbat (void)
|
||||
@@ -210,7 +217,7 @@ void TcpLedbat::CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsA
|
||||
|
||||
max_cwnd = static_cast<uint32_t>(tcb->m_highTxMark.Get () - tcb->m_lastAckedSeq) + segmentsAcked * tcb->m_segmentSize;
|
||||
cwnd = std::min (cwnd, max_cwnd);
|
||||
cwnd = std::max (cwnd, tcb->m_segmentSize);
|
||||
cwnd = std::max (cwnd, m_minCwnd * tcb->m_segmentSize);
|
||||
tcb->m_cWnd = cwnd;
|
||||
|
||||
if (tcb->m_cWnd <= tcb->m_ssThresh)
|
||||
|
||||
@@ -192,6 +192,7 @@ private:
|
||||
OwdCircBuf m_baseHistory; //!< Buffer to store the base delay
|
||||
OwdCircBuf m_noiseFilter; //!< Buffer to store the current delay
|
||||
uint32_t m_flag; //!< LEDBAT Flag
|
||||
uint32_t m_minCwnd; //!< Minimum cWnd value mentioned in RFC 6817
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user