26 #include "ns3/tcp-congestion-ops.h"
27 #include "ns3/tcp-recovery-ops.h"
28 #include "ns3/tcp-socket-base.h"
29 #include "ns3/tcp-prr-recovery.h"
30 #include "ns3/string.h"
57 uint32_t unAckDataCount,
58 uint32_t bytesInFlight,
59 uint32_t m_deliveredBytes,
61 const std::string &reductionBound,
62 const std::string &name);
65 virtual void DoRun (
void);
82 uint32_t unAckDataCount,
83 uint32_t bytesInFlight,
84 uint32_t deliveredBytes,
86 const std::string &reductionBound,
87 const std::string &name)
91 m_ssThresh (ssThresh),
92 m_unAckDataCount (unAckDataCount),
93 m_bytesInFlight (bytesInFlight),
94 m_deliveredBytes (deliveredBytes),
95 m_bytesSent (bytesSent),
96 m_reductionBound (reductionBound)
103 m_state = CreateObject<TcpSocketState> ();
117 "There should be at least one transmission on entering recovery");
119 for (uint32_t iterator = 0; iterator <
m_bytesSent; )
133 "Updated cwnd should be less than or equal to the existing cwnd");
138 "Updated cwnd should be greater than or equal to the existing cwnd");
154 "Prr test on cWnd when bytesInFlight is greater than ssThresh with SSRB"),
157 "Prr test on cWnd when bytesInFlight is lower than ssThresh with SSRB"),
160 "Prr test on cWnd when bytesInFlight is greater than ssThresh with CRB"),
163 "Prr test on cWnd when bytesInFlight is lower than ssThresh with CRB"),
PRR Recovery algorithm test.
uint32_t m_bytesInFlight
Current bytes in flight.
uint32_t m_bytesSent
Bytes sent while in recovery phase.
PrrRecoveryTest(uint32_t cWnd, uint32_t segmentSize, uint32_t ssThresh, uint32_t unAckDataCount, uint32_t bytesInFlight, uint32_t m_deliveredBytes, uint32_t bytesSent, const std::string &reductionBound, const std::string &name)
Constructor.
uint32_t m_segmentSize
Segment size.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< TcpSocketState > m_state
TCP socket state.
uint32_t m_ssThresh
Slow Start Threshold.
uint32_t m_deliveredBytes
Bytes SACKed on last acknowledgment.
uint32_t m_cWnd
Congestion window.
const std::string m_reductionBound
Type of reduction bound to be used.
uint32_t m_unAckDataCount
Unacknowledged data at the start of recovery.
Hold variables of type string.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
TracedValue< uint32_t > m_bytesInFlight
Bytes in flight.
TracedValue< uint32_t > m_cWndInfl
Inflated congestion window trace (used only for backward compatibility purpose)
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
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(void) const
Get the underlying value.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to a limit and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static PrrRecoveryTestSuite g_TcpPrrRecoveryTest
Static variable for test initialization.