20 #include "ns3/tcp-congestion-ops.h"
21 #include "ns3/tcp-highspeed.h"
22 #include "ns3/tcp-socket-base.h"
46 void DoRun()
override;
55 const std::string& name)
65 m_state = CreateObject<TcpSocketState>();
73 uint32_t coeffA = TcpHighSpeed::TableLookupA(segCwnd);
78 cong->IncreaseWindow(
m_state, (segCwnd / coeffA) + 1);
100 void DoRun()
override;
109 const std::string& name)
119 m_state = CreateObject<TcpSocketState>();
127 double coeffB = 1.0 - TcpHighSpeed::TableLookupB(segCwnd);
131 uint32_t ssThHS =
std::max(2.0, segCwnd * coeffB);
149 {38, 128, }, {118, 112, }, {221, 104, },
150 {347, 98, }, {495, 93, }, {663, 89, },
151 {851, 86, }, {1058, 83, }, {1284, 81, },
152 {1529, 78, }, {1793, 76, }, {2076, 74, },
153 {2378, 72, }, {2699, 71, }, {3039, 69, },
154 {3399, 68, }, {3778, 66, }, {4177, 65, },
155 {4596, 64, }, {5036, 62, }, {5497, 61, },
156 {5979, 60, }, {6483, 59, }, {7009, 58, },
157 {7558, 57, }, {8130, 56, }, {8726, 55, },
158 {9346, 54, }, {9991, 53, }, {10661, 52, },
159 {11358, 52, }, {12082, 51, }, {12834, 50, },
160 {13614, 49, }, {14424, 48, }, {15265, 48, },
161 {16137, 47, }, {17042, 46, }, {17981, 45, },
162 {18955, 45, }, {19965, 44, }, {21013, 43, },
163 {22101, 43, }, {23230, 42, }, {24402, 41, },
164 {25618, 41, }, {26881, 40, }, {28193, 39, },
165 {29557, 39, }, {30975, 38, }, {32450, 38, },
166 {33986, 37, }, {35586, 36, }, {37253, 36, },
167 {38992, 35, }, {40808, 35, }, {42707, 34, },
168 {44694, 33, }, {46776, 33, }, {48961, 32, },
169 {51258, 32, }, {53677, 31, }, {56230, 30, },
170 {58932, 30, }, {61799, 29, }, {64851, 28, },
171 {68113, 28, }, {71617, 27, }, {75401, 26, },
172 {79517, 26, }, {84035, 25, }, {89053, 24, },
175 #define HIGHSPEED_VALUES_N 71
188 std::stringstream ss;
196 "Highspeed increment test on cWnd " + ss.str()),
201 "Highspeed increment test on cWnd " + ss.str()),
206 "Highspeed increment test on cWnd " + ss.str()),
211 "Highspeed Decrement test on cWnd " + ss.str()),
216 "Highspeed Decrement test on cWnd " + ss.str()),
221 "Highspeed Decrement test on cWnd " + ss.str()),
Testing the congestion avoidance decrement on TcpHighSpeed.
uint32_t m_segmentSize
Segment size.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
Ptr< TcpSocketState > m_state
TCP socket state.
TcpHighSpeedDecrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
Testing the congestion avoidance increment on TcpHighSpeed.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_segmentSize
Segment size.
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_cWnd
Congestion window.
TcpHighSpeedIncrementTest(uint32_t cWnd, uint32_t segmentSize, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
T Get() const
Get the underlying value.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TcpHighSpeed Congestion window values to test.
unsigned int cwnd
Congestion window.
unsigned int md
Currently unused.
static TcpHighSpeedTestSuite g_tcpHighSpeedTest
Static variable for test initialization.
static const HighSpeedImportantValues highSpeedImportantValues[]
List of data to be tested.
#define HIGHSPEED_VALUES_N