Skip to content

Commit d1e6783

Browse files
indu98Viyom
authored andcommitted
Add BQL support and RemoveAqm method
1 parent 3325868 commit d1e6783

20 files changed

+115
-70
lines changed

src/aqm-eval-suite/examples/LBE-transport-sender.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LbeTransportSender : public ScenarioImpl
4040
~LbeTransportSender ();
4141

4242
protected:
43-
virtual EvaluationTopology CreateScenario (std::string aqm);
43+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4444
};
4545

4646
LbeTransportSender::LbeTransportSender ()
@@ -52,14 +52,14 @@ LbeTransportSender::~LbeTransportSender ()
5252
}
5353

5454
EvaluationTopology
55-
LbeTransportSender::CreateScenario (std::string aqm)
55+
LbeTransportSender::CreateScenario (std::string aqm, bool isBql)
5656
{
5757
PointToPointHelper pointToPoint;
5858
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 2;
6161

62-
EvaluationTopology et ("LbeTransportSender", nflow, pointToPoint, aqm, 698);
62+
EvaluationTopology et ("LbeTransportSender", nflow, pointToPoint, aqm, 698, isBql);
6363
ApplicationContainer ac1 = et.CreateFlow (StringValue ("1ms"),
6464
StringValue ("1ms"),
6565
StringValue ("10Mbps"),
@@ -84,11 +84,13 @@ int
8484
main (int argc, char *argv[])
8585
{
8686
std::string QueueDiscMode = "";
87+
std::string isBql = "";
8788
CommandLine cmd;
8889
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
90+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
8991
cmd.Parse (argc, argv);
9092

9193
LbeTransportSender sce;
9294
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
93-
sce.RunSimulation (Seconds (310));
95+
sce.RunSimulation (Seconds (310), isBql == "true");
9496
}

src/aqm-eval-suite/examples/aggressive-transport-sender.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AggressiveTransportSender : public ScenarioImpl
4141
~AggressiveTransportSender ();
4242

4343
protected:
44-
virtual EvaluationTopology CreateScenario (std::string aqm);
44+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4545
};
4646
std::string AggressiveTcpVariant = "ns3::TcpBic";
4747

@@ -54,14 +54,14 @@ AggressiveTransportSender::~AggressiveTransportSender ()
5454
}
5555

5656
EvaluationTopology
57-
AggressiveTransportSender::CreateScenario (std::string aqm)
57+
AggressiveTransportSender::CreateScenario (std::string aqm, bool isBql)
5858
{
5959
PointToPointHelper pointToPoint;
6060
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
6161
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6262
uint32_t nflow = 1;
6363

64-
EvaluationTopology et ("AggressiveTransportSender", nflow, pointToPoint, aqm, 698);
64+
EvaluationTopology et ("AggressiveTransportSender", nflow, pointToPoint, aqm, 698, isBql);
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
6666
StringValue ("1ms"),
6767
StringValue ("10Mbps"),
@@ -78,15 +78,17 @@ main (int argc, char *argv[])
7878
{
7979
std::string QueueDiscMode = "";
8080
std::string TcpVariant = "";
81+
std::string isBql = "";
8182
CommandLine cmd;
8283
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
8384
cmd.AddValue ("TcpVariant", "Aggressive TCP variant", TcpVariant);
85+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
8486
cmd.Parse (argc, argv);
8587
if ((TcpVariant == "ns3::TcpYeah") || (TcpVariant == "ns3::TcpBic") || (TcpVariant == "ns3::TcpHighSpeed") || (TcpVariant == "ns3::TcpIllinois") || (TcpVariant == "ns3::TcpScalable") || (TcpVariant == "ns3::TcpHtcp"))
8688
{
8789
AggressiveTcpVariant = TcpVariant;
8890
}
8991
AggressiveTransportSender sce;
9092
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
91-
sce.RunSimulation (Seconds (310));
93+
sce.RunSimulation (Seconds (310), isBql == "true");
9294
}

src/aqm-eval-suite/examples/aqm-eval-suite-runner.cc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <map>
2626
#include <iostream>
2727
#include <fstream>
28+
#include <algorithm>
2829
#include "ns3/core-module.h"
2930
#include <sys/stat.h>
3031

@@ -43,6 +44,13 @@ std::string queueDisc = "QueueDisc";
4344
uint32_t nAQM = 7;
4445
std::string AggressiveTcp = "";
4546
std::string QueueDiscMode = "QUEUE_DISC_MODE_PACKETS";
47+
std::string isBql = "false";
48+
49+
void RemoveAqm (std::string aqm)
50+
{
51+
AQM.erase (std::remove (AQM.begin (), AQM.end (), aqm), AQM.end ());
52+
nAQM--;
53+
}
4654

4755
void RunOneScenario (std::string scenarioName)
4856
{
@@ -52,11 +60,11 @@ void RunOneScenario (std::string scenarioName)
5260
std::string commandToRun;
5361
if (AggressiveTcp != "" && scenarioName == "AggressiveTransportSender")
5462
{
55-
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --TcpVariant=ns3::") + AggressiveTcp + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
63+
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --TcpVariant=ns3::") + AggressiveTcp + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string (" --isBql=") + isBql + std::string ("\"");
5664
}
5765
else
5866
{
59-
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
67+
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string (" --isBql=") + isBql + std::string ("\"");
6068
}
6169
system (commandToRun.c_str ());
6270
std::ofstream outfile;
@@ -72,7 +80,7 @@ void RunOneScenario (std::string scenarioName)
7280
for (uint32_t i = 0; i < nAQM; i++)
7381
{
7482
std::string proQdelThr = std::string ("python src/aqm-eval-suite/utils/generate-ellipseinput.py ") + scenarioName + " " + AQM[i] + queueDisc;
75-
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc;
83+
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc + " " + std::to_string (i + 1);
7684
std::string plotGoodput = std::string ("python src/aqm-eval-suite/utils/goodput_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
7785
std::string plotDelay = std::string ("python src/aqm-eval-suite/utils/delay_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
7886
system (proQdelThr.c_str ());
@@ -109,7 +117,7 @@ void RunRttFairness (std::string scenarioName)
109117
mkdir ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/data")).c_str (), 0700);
110118
mkdir ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/graph")).c_str (), 0700);
111119
}
112-
std::string commandToRun = std::string ("./waf --run \"RttFairness") + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
120+
std::string commandToRun = std::string ("./waf --run \"RttFairness") + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string (" --isBql=") + isBql + std::string ("\"");
113121
system (commandToRun.c_str ());
114122
for (uint32_t i = 1; i <= 15; i++)
115123
{
@@ -129,7 +137,7 @@ void RunRttFairness (std::string scenarioName)
129137
for (uint32_t i = 0; i < nAQM; i++)
130138
{
131139
std::string proQdelThr = std::string ("python src/aqm-eval-suite/utils/generate-ellipseinput.py ") + scenarioName + " " + AQM[i] + queueDisc;
132-
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc;
140+
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc + " " + std::to_string (i + 1);
133141
std::string plotGoodput = std::string ("python src/aqm-eval-suite/utils/goodput_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
134142
std::string plotDelay = std::string ("python src/aqm-eval-suite/utils/delay_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
135143
std::string plotDrop = std::string ("python src/aqm-eval-suite/utils/drop_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
@@ -184,6 +192,7 @@ int main (int argc, char *argv[])
184192
cmd.AddValue ("name", "Name of the scenario (eg: TCPFriendlySameInitCwnd)", scenarioName);
185193
cmd.AddValue ("AggressiveTcp", "Variant of the Aggressive TCP", AggressiveTcp);
186194
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
195+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
187196

188197
cmd.Parse (argc, argv);
189198

src/aqm-eval-suite/examples/bidirectional-traffic.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BiDirectional : public ScenarioImpl
3737
~BiDirectional ();
3838

3939
protected:
40-
virtual EvaluationTopology CreateScenario (std::string aqm);
40+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4141
};
4242

4343
BiDirectional::BiDirectional ()
@@ -49,14 +49,14 @@ BiDirectional::~BiDirectional ()
4949
}
5050

5151
EvaluationTopology
52-
BiDirectional::CreateScenario (std::string aqm)
52+
BiDirectional::CreateScenario (std::string aqm, bool isBql)
5353
{
5454
PointToPointHelper pointToPoint;
5555
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
5656
pointToPoint.SetChannelAttribute ("Delay", StringValue ("45ms"));
5757
uint32_t nflow = 0.036 * 90;
5858

59-
EvaluationTopology et ("BiDirectional", nflow, pointToPoint, aqm, 698);
59+
EvaluationTopology et ("BiDirectional", nflow, pointToPoint, aqm, 698, isBql);
6060
for (uint32_t i = 0; i < nflow; i++)
6161
{
6262
if ( i >= (nflow / 2))
@@ -88,11 +88,13 @@ int
8888
main (int argc, char *argv[])
8989
{
9090
std::string QueueDiscMode = "";
91+
std::string isBql = "";
9192
CommandLine cmd;
9293
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
94+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
9395
cmd.Parse (argc, argv);
9496

9597
BiDirectional sce;
9698
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
97-
sce.RunSimulation (Seconds (310));
99+
sce.RunSimulation (Seconds (310), isBql == "true");
98100
}

src/aqm-eval-suite/examples/heavy-congestion.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class HeavyCongestion : public ScenarioImpl
4040
~HeavyCongestion ();
4141

4242
protected:
43-
virtual EvaluationTopology CreateScenario (std::string aqm);
43+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4444
};
4545

4646
HeavyCongestion::HeavyCongestion ()
@@ -52,14 +52,14 @@ HeavyCongestion::~HeavyCongestion ()
5252
}
5353

5454
EvaluationTopology
55-
HeavyCongestion::CreateScenario (std::string aqm)
55+
HeavyCongestion::CreateScenario (std::string aqm, bool isBql)
5656
{
5757
PointToPointHelper pointToPoint;
5858
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 0.114 * 90;
6161

62-
EvaluationTopology et ("HeavyCongestion", nflow, pointToPoint, aqm, 698);
62+
EvaluationTopology et ("HeavyCongestion", nflow, pointToPoint, aqm, 698, isBql);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -78,11 +78,13 @@ int
7878
main (int argc, char *argv[])
7979
{
8080
std::string QueueDiscMode = "";
81+
std::string isBql = "";
8182
CommandLine cmd;
8283
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
84+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
8385
cmd.Parse (argc, argv);
8486

8587
HeavyCongestion sce;
8688
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
87-
sce.RunSimulation (Seconds (310));
89+
sce.RunSimulation (Seconds (310), isBql == "true");
8890
}

src/aqm-eval-suite/examples/medium-congestion.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class MediumCongestion : public ScenarioImpl
4040
~MediumCongestion ();
4141

4242
protected:
43-
virtual EvaluationTopology CreateScenario (std::string aqm);
43+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4444
};
4545

4646
MediumCongestion::MediumCongestion ()
@@ -52,14 +52,14 @@ MediumCongestion::~MediumCongestion ()
5252
}
5353

5454
EvaluationTopology
55-
MediumCongestion::CreateScenario (std::string aqm)
55+
MediumCongestion::CreateScenario (std::string aqm, bool isBql)
5656
{
5757
PointToPointHelper pointToPoint;
5858
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 0.081 * 90;
6161

62-
EvaluationTopology et ("MediumCongestion", nflow, pointToPoint, aqm, 698);
62+
EvaluationTopology et ("MediumCongestion", nflow, pointToPoint, aqm, 698, isBql);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -78,11 +78,13 @@ int
7878
main (int argc, char *argv[])
7979
{
8080
std::string QueueDiscMode = "";
81+
std::string isBql = "";
8182
CommandLine cmd;
8283
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
84+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
8385
cmd.Parse (argc, argv);
8486

8587
MediumCongestion sce;
8688
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
87-
sce.RunSimulation (Seconds (310));
89+
sce.RunSimulation (Seconds (310), isBql == "true");
8890
}

src/aqm-eval-suite/examples/mild-congestion.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class MildCongestion : public ScenarioImpl
4040
~MildCongestion ();
4141

4242
protected:
43-
virtual EvaluationTopology CreateScenario (std::string aqm);
43+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4444
};
4545

4646
MildCongestion::MildCongestion ()
@@ -52,14 +52,14 @@ MildCongestion::~MildCongestion ()
5252
}
5353

5454
EvaluationTopology
55-
MildCongestion::CreateScenario (std::string aqm)
55+
MildCongestion::CreateScenario (std::string aqm, bool isBql)
5656
{
5757
PointToPointHelper pointToPoint;
5858
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("45ms"));
6060
uint32_t nflow = 0.036 * 90;
6161

62-
EvaluationTopology et ("MildCongestion", nflow, pointToPoint, aqm, 698);
62+
EvaluationTopology et ("MildCongestion", nflow, pointToPoint, aqm, 698, isBql);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -78,11 +78,13 @@ int
7878
main (int argc, char *argv[])
7979
{
8080
std::string QueueDiscMode = "";
81+
std::string isBql = "";
8182
CommandLine cmd;
8283
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
84+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
8385
cmd.Parse (argc, argv);
8486

8587
MildCongestion sce;
8688
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
87-
sce.RunSimulation (Seconds (310));
89+
sce.RunSimulation (Seconds (310), isBql == "true");
8890
}

src/aqm-eval-suite/examples/rtt-fairness.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RttFairness : public ScenarioImpl
4141
~RttFairness ();
4242

4343
protected:
44-
virtual EvaluationTopology CreateScenario (std::string aqm);
44+
virtual EvaluationTopology CreateScenario (std::string aqm, bool isBql);
4545

4646
private:
4747
uint32_t m_run;
@@ -59,7 +59,7 @@ RttFairness::~RttFairness ()
5959
}
6060

6161
EvaluationTopology
62-
RttFairness::CreateScenario (std::string aqm)
62+
RttFairness::CreateScenario (std::string aqm, bool isBql)
6363
{
6464
uint32_t reqDelay = (delay[m_run] - 4) / 4;
6565
char OWD[20];
@@ -72,7 +72,7 @@ RttFairness::CreateScenario (std::string aqm)
7272
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
7373
uint32_t nflow = 2;
7474

75-
EvaluationTopology et (scenarioName, nflow, pointToPoint, aqm, 698);
75+
EvaluationTopology et (scenarioName, nflow, pointToPoint, aqm, 698, isBql);
7676
ApplicationContainer ac1 = et.CreateFlow (StringValue ("24ms"),
7777
StringValue ("24ms"),
7878
StringValue ("10Mbps"),
@@ -97,14 +97,16 @@ int
9797
main (int argc, char *argv[])
9898
{
9999
std::string QueueDiscMode = "";
100+
std::string isBql = "";
100101
CommandLine cmd;
101102
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
103+
cmd.AddValue ("isBql", "Enables/Disables Byte Queue Limits", isBql);
102104
cmd.Parse (argc, argv);
103105

104106
for (uint32_t i = 0; i < 15; i++)
105107
{
106108
RttFairness rf (i);
107109
rf.ConfigureQueueDisc (45, 750, "1Mbps", "2ms", QueueDiscMode);
108-
rf.RunSimulation (Seconds (610));
110+
rf.RunSimulation (Seconds (610), isBql == "true");
109111
}
110112
}

0 commit comments

Comments
 (0)