12#include "ns3/string.h"
13#include "ns3/tcp-congestion-ops.h"
14#include "ns3/tcp-ledbat.h"
15#include "ns3/tcp-socket-base.h"
47 const std::string& name);
50 void DoRun()
override;
67 const std::string& name)
101 "cWnd has not updated correctly");
164 uint32_t currentRcvTimestampEchoReply,
166 const std::string& name);
169 void DoRun()
override;
191 uint32_t currentRcvTimestampEchoReply,
193 const std::string& name)
218 cong->SetAttribute(
"AllowedIncrease",
225 m_state->m_rcvTimestampValue = 40;
226 m_state->m_rcvTimestampEchoReply = 20;
269 "cWnd of 8676 should increase by 289");
320 "cWnd of 8676 should decrease by 97");
346 "cWnd should be clamped to minCwnd (2892)");
372 "LEDBAT falls to New Reno for slowstart"),
380 "LEDBAT falls to New Reno if timestamps are not found"),
392 "LEDBAT Congestion Avoidance Increment"),
404 "LEDBAT Congestion Avoidance Increment (Limited by max_cwnd)"),
416 "LEDBAT Congestion Avoidance Decrement"),
428 "LEDBAT Congestion Avoidance Decrement (Limited by min_cwnd)"),
Test to validate cWnd increment/decrement in LEDBAT Congestion Avoidance Phase.
Ptr< TcpSocketState > m_state
state
uint32_t m_currentRcvTimestampEchoReply
current echoed timestamp value
uint32_t m_ssThresh
ss thresh
void DoRun() override
Implementation to actually run this TestCase.
TestType m_testType
test type
uint32_t m_rcvTimestampValue
received timestamp value
uint32_t m_segmentsAcked
segments acked
TcpLedbatCongestionAvoidanceTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, uint32_t bytesInFlight, Time rtt, uint32_t rcvTimestampValue, uint32_t currentRcvTimestampEchoReply, TestType testType, const std::string &name)
Constructor.
uint32_t m_segmentSize
segment size
uint32_t m_bytesInFlight
bytes in flight (after ACK)
TestType
Type of expected CWND behavior in LEDBAT congestion avoidance.
@ DECREMENT_TEST
To enable check for CWND decreases because the measured queue delay is above the target delay (negati...
@ MIN_CWND_TEST
To enable check that CWND decrease is limited by the minimum CWND constraint (MinCwnd × segmentSize).
@ INCREMENT_TEST
To enable check for CWND increases because the measured queue delay is below the target delay (positi...
@ MAX_CWND_TEST
To enable check that CWND increase is limited by the maximum allowed CWND, computed from flight size ...
LEDBAT should be same as NewReno during slow start, and when timestamps are disabled.
uint32_t m_segmentsAcked
segments acked
TcpLedbatToNewReno(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t segmentsAcked, uint32_t bytesInFlight, Time rtt, const std::string &name)
Constructor.
Ptr< TcpSocketState > m_state
state
uint32_t m_bytesInFlight
bytes in flight
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_segmentSize
segment size
uint32_t m_ssThresh
ss thresh
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
@ UNIT
This test suite implements a Unit Test.
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Simulation virtual time values and global simulation resolution.
Hold an unsigned integer type.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpLedbatTestSuite g_tcpledbatTest
static var for test initialization