tcp: Remove TcpCongestionOps::ReduceCwnd method

This commit is contained in:
Tom Henderson
2020-12-13 20:03:56 -08:00
parent 4ccaaeef95
commit ee712cfb02
9 changed files with 0 additions and 43 deletions

View File

@@ -273,14 +273,6 @@ TcpBic::GetSsThresh (Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight)
return ssThresh;
}
void
TcpBic::ReduceCwnd (Ptr<TcpSocketState> tcb)
{
NS_LOG_FUNCTION (this << tcb);
tcb->m_cWnd = std::max (tcb->m_cWnd.Get () / 2, tcb->m_segmentSize);
}
Ptr<TcpCongestionOps>
TcpBic::Fork (void)
{

View File

@@ -103,7 +103,6 @@ public:
uint32_t segmentsAcked);
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
uint32_t bytesInFlight);
virtual void ReduceCwnd (Ptr<TcpSocketState> tcb);
virtual Ptr<TcpCongestionOps> Fork ();

View File

@@ -250,14 +250,6 @@ TcpNewReno::GetSsThresh (Ptr<const TcpSocketState> state,
return std::max (2 * state->m_segmentSize, bytesInFlight / 2);
}
void
TcpNewReno::ReduceCwnd (Ptr<TcpSocketState> tcb)
{
NS_LOG_FUNCTION (this << tcb);
tcb->m_cWnd = std::max (tcb->m_cWnd.Get () / 2, tcb->m_segmentSize);
}
Ptr<TcpCongestionOps>
TcpNewReno::Fork ()
{

View File

@@ -188,13 +188,6 @@ public:
const TcpRateOps::TcpRateConnection &rc,
const TcpRateOps::TcpRateSample &rs);
/**
* \brief Reduces congestion window on receipt of ECN Echo Flag
*
* \param tcb internal congestion state
*/
virtual void ReduceCwnd (Ptr<TcpSocketState> tcb) = 0;
// Present in Linux but not in ns-3 yet:
/* call when ack arrives (optional) */
// void (*in_ack_event)(struct sock *sk, u32 flags);
@@ -243,7 +236,6 @@ public:
virtual void IncreaseWindow (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
uint32_t bytesInFlight);
virtual void ReduceCwnd (Ptr<TcpSocketState> tcb);
virtual Ptr<TcpCongestionOps> Fork ();
protected:

View File

@@ -129,11 +129,6 @@ TcpDctcp::GetSsThresh (Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight)
return static_cast<uint32_t> ((1 - m_alpha / 2.0) * tcb->m_cWnd);
}
void
TcpDctcp::ReduceCwnd (Ptr<TcpSocketState> tcb)
{
}
void
TcpDctcp::PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked, const Time &rtt)
{

View File

@@ -86,7 +86,6 @@ public:
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
uint32_t bytesInFlight);
virtual Ptr<TcpCongestionOps> Fork ();
virtual void ReduceCwnd (Ptr<TcpSocketState> tcb);
virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
const Time &rtt);
virtual void CwndEvent (Ptr<TcpSocketState> tcb,

View File

@@ -132,14 +132,6 @@ TcpLinuxReno::GetSsThresh (Ptr<const TcpSocketState> state,
return std::max<uint32_t> (2 * state->m_segmentSize, state->m_cWnd / 2);
}
void
TcpLinuxReno::ReduceCwnd (Ptr<TcpSocketState> tcb)
{
NS_LOG_FUNCTION (this << tcb);
tcb->m_cWnd = std::max ( tcb->m_cWnd.Get () / 2, tcb->m_segmentSize);
}
Ptr<TcpCongestionOps>
TcpLinuxReno::Fork ()
{

View File

@@ -52,7 +52,6 @@ public:
virtual void IncreaseWindow (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
uint32_t bytesInFlight);
virtual void ReduceCwnd (Ptr<TcpSocketState> tcb);
virtual Ptr<TcpCongestionOps> Fork ();
protected:

View File

@@ -273,7 +273,6 @@ TcpDctcpCongestedRouter::SendDataPacket (SequenceNumber32 seq, uint32_t maxSize,
if (m_tcb->m_ecnState == TcpSocketState::ECN_ECE_RCVD && m_ecnEchoSeq.Get () > m_ecnCWRSeq.Get () && !isRetransmission && m_testCase != 3)
{
NS_LOG_INFO ("Backoff mechanism by reducing CWND by half because we've received ECN Echo");
m_congestionControl->ReduceCwnd (m_tcb);
m_tcb->m_ssThresh = m_tcb->m_cWnd;
flags |= TcpHeader::CWR;
m_ecnCWRSeq = seq;
@@ -665,13 +664,11 @@ TcpDctcpDecrementTest::ExecuteTest (void)
Ptr<TcpDctcp> cong = CreateObject <TcpDctcp> ();
m_state->m_ecnState = TcpSocketState::ECN_IDLE;
cong->PktsAcked (m_state, m_segmentsAcked, m_rtt);
cong->ReduceCwnd (m_state);
NS_TEST_ASSERT_MSG_EQ (m_state->m_cWnd.Get (), m_cWnd,
"cWnd has updated correctly");
m_state->m_ecnState = TcpSocketState::ECN_ECE_RCVD;
cong->PktsAcked (m_state, m_segmentsAcked, m_rtt);
cong->ReduceCwnd (m_state);
uint32_t val = (uint32_t)(m_cWnd * (1 - 0.0625 / 2.0));
NS_TEST_ASSERT_MSG_EQ (m_state->m_cWnd.Get (), val,