24 #include "ns3/tcp-bbr.h"
25 #include "ns3/tcp-congestion-ops.h"
26 #include "ns3/tcp-socket-base.h"
48 void DoRun()
override;
98 void DoRun()
override;
109 const std::string& name)
129 double actualPacingGain;
130 double actualCwndGain;
137 cong->EnterStartup();
140 actualPacingGain = cong->GetPacingGain();
141 actualCwndGain = cong->GetCwndGain();
151 cong->EnterProbeBW();
158 desiredPacingGain = 1.25;
163 cong->EnterProbeRTT();
164 desiredPacingGain = 1;
172 actualPacingGain = cong->GetPacingGain();
173 actualCwndGain = cong->GetCwndGain();
177 "BBR has not updated into desired pacing gain");
180 "BBR has not updated into desired cwnd gain");
207 "BBR should enter to STARTUP phase and set cwnd and pacing gain accordingly"),
213 "BBR should enter to DRAIN phase and set cwnd and pacing gain accordingly"),
220 "BBR should enter to BBR_PROBE_BW phase and set cwnd and pacing gain accordingly"),
227 "BBR should enter to BBR_PROBE_RTT phase and set cwnd and pacing gain accordingly"),
This class can be used to hold variables of floating point type such as 'double' or 'float'.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
Tests whether BBR sets correct value of pacing and cwnd gain based on different state.
void DoRun() override
Implementation to actually run this TestCase.
TcpBbrCheckGainValuesTest(TcpBbr::BbrMode_t state, double highGain, const std::string &name)
constructor
TcpBbr::BbrMode_t m_mode
BBR mode under test.
double m_highGain
Value of BBR high gain.
void ExecuteTest()
Execute the test.
BbrMode_t
BBR has the following 4 modes for deciding how fast to send:
@ BBR_PROBE_RTT
Cut inflight to min to probe min_rtt.
@ BBR_DRAIN
Drain any queue created during startup.
@ BBR_STARTUP
Ramp up sending rate rapidly to fill pipe.
@ BBR_PROBE_BW
Discover, share bw: pace around estimated bw.
Testing whether BBR enables pacing.
TcpBbrPacingEnableTest(bool pacing, const std::string &name)
constructor
bool m_pacing
Initial pacing configuration.
void DoRun() override
Implementation to actually run this TestCase.
void ExecuteTest()
Execute the test.
TcpBbrTestSuite()
constructor
bool m_pacing
Pacing status.
@ CA_OPEN
Normal state, no dubious events.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#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.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpBbrTestSuite g_tcpBbrTest
static variable for test initialization