tcp: Fix BBR code for optimized compilation mode

This commit is contained in:
Vivek Jain
2021-06-08 07:05:47 +00:00
committed by Tom Henderson
parent a352f08572
commit f0b7deab3d
3 changed files with 11 additions and 4 deletions

View File

@@ -213,7 +213,10 @@ int main (int argc, char *argv [])
// Create a new directory to store the output of the program
dir = "bbr-results/" + currentTime + "/";
std::string dirToSave = "mkdir -p " + dir;
system (dirToSave.c_str ());
if (system (dirToSave.c_str ()) == -1)
{
exit (1);
}
// The plotting scripts are provided in the following repository, if needed:
// https://github.com/mohittahiliani/BBR-Validation/
@@ -236,7 +239,10 @@ int main (int argc, char *argv [])
// Generate PCAP traces if it is enabled
if (enablePcap)
{
system ((dirToSave + "/pcap/").c_str ());
if (system ((dirToSave + "/pcap/").c_str ()) == -1)
{
exit (1);
}
bottleneckLink.EnablePcapAll (dir + "/pcap/bbr", true);
}

View File

@@ -652,6 +652,7 @@ TcpBbr::WhichState (BbrMode_t mode) const
return "BBR_PROBE_RTT";
}
NS_ASSERT (false);
return "";
}
void

View File

@@ -107,8 +107,8 @@ TcpBbrCheckGainValuesTest::ExecuteTest ()
{
Ptr<TcpBbr> cong = CreateObject <TcpBbr> ();
cong->SetAttribute ("HighGain", DoubleValue (m_highGain));
double actualPacingGain, actualCwndGain, desiredPacingGain, desiredCwndGain;
TcpBbr::BbrMode_t desiredMode;
double actualPacingGain, actualCwndGain, desiredPacingGain = m_highGain, desiredCwndGain = m_highGain;
TcpBbr::BbrMode_t desiredMode = TcpBbr::BBR_STARTUP;
switch (m_mode)
{
case TcpBbr::BBR_STARTUP: