View | Details | Raw Unified | Return to bug 2921
Collapse All | Expand All

(-)a/src/internet/model/tcp-ledbat.cc (-2 / +9 lines)
 Lines 60-65   TcpLedbat::GetTypeId (void) Link Here 
60
                   MakeEnumAccessor (&TcpLedbat::SetDoSs),
60
                   MakeEnumAccessor (&TcpLedbat::SetDoSs),
61
                   MakeEnumChecker (DO_SLOWSTART, "yes",
61
                   MakeEnumChecker (DO_SLOWSTART, "yes",
62
                                    DO_NOT_SLOWSTART, "no"))
62
                                    DO_NOT_SLOWSTART, "no"))
63
    .AddAttribute ("MIN_CWND",
64
                   "Minimum cWnd for Ledbat",
65
                   UintegerValue (2),
66
                   MakeUintegerAccessor (&TcpLedbat::m_minCwnd),
67
                   MakeUintegerChecker<uint32_t> ())
63
  ;
68
  ;
64
  return tid;
69
  return tid;
65
}
70
}
 Lines 92-98   TcpLedbat::TcpLedbat (void) Link Here 
92
  m_lastRollover = 0;
97
  m_lastRollover = 0;
93
  m_sndCwndCnt = 0;
98
  m_sndCwndCnt = 0;
94
  m_flag = LEDBAT_CAN_SS;
99
  m_flag = LEDBAT_CAN_SS;
95
}
100
  m_minCwnd = 2;
101
};
96
102
97
void TcpLedbat::InitCircBuf (struct OwdCircBuf &buffer)
103
void TcpLedbat::InitCircBuf (struct OwdCircBuf &buffer)
98
{
104
{
 Lines 115-120   TcpLedbat::TcpLedbat (const TcpLedbat& sock) Link Here 
115
  m_lastRollover = sock.m_lastRollover;
121
  m_lastRollover = sock.m_lastRollover;
116
  m_sndCwndCnt = sock.m_sndCwndCnt;
122
  m_sndCwndCnt = sock.m_sndCwndCnt;
117
  m_flag = sock.m_flag;
123
  m_flag = sock.m_flag;
124
  m_minCwnd = sock.m_minCwnd;
118
}
125
}
119
126
120
TcpLedbat::~TcpLedbat (void)
127
TcpLedbat::~TcpLedbat (void)
 Lines 209-215   void TcpLedbat::CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsA Link Here 
209
216
210
  max_cwnd = static_cast<uint32_t>(tcb->m_highTxMark.Get () - tcb->m_lastAckedSeq) + segmentsAcked * tcb->m_segmentSize;
217
  max_cwnd = static_cast<uint32_t>(tcb->m_highTxMark.Get () - tcb->m_lastAckedSeq) + segmentsAcked * tcb->m_segmentSize;
211
  cwnd = std::min (cwnd, max_cwnd);
218
  cwnd = std::min (cwnd, max_cwnd);
212
  cwnd = std::max (cwnd, tcb->m_segmentSize);
219
  cwnd = std::max (cwnd, m_minCwnd * tcb->m_segmentSize);
213
  tcb->m_cWnd = cwnd;
220
  tcb->m_cWnd = cwnd;
214
221
215
  if (tcb->m_cWnd <= tcb->m_ssThresh)
222
  if (tcb->m_cWnd <= tcb->m_ssThresh)
(-)a/src/internet/model/tcp-ledbat.h (+1 lines)
 Lines 192-197   private: Link Here 
192
  OwdCircBuf m_baseHistory;   //!< Buffer to store the base delay
192
  OwdCircBuf m_baseHistory;   //!< Buffer to store the base delay
193
  OwdCircBuf m_noiseFilter;   //!< Buffer to store the current delay
193
  OwdCircBuf m_noiseFilter;   //!< Buffer to store the current delay
194
  uint32_t m_flag;                   //!< LEDBAT Flag
194
  uint32_t m_flag;                   //!< LEDBAT Flag
195
  uint32_t m_minCwnd;                //!< Minimum cWnd value mentioned in RFC 6817
195
};
196
};
196
197
197
} // namespace ns3
198
} // namespace ns3

Return to bug 2921