Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1263)

Unified Diff: src/traffic-control/examples/red-tests.cc

Issue 328360043: Patch for PiSquareQueueDisc with CoupledAQM Support
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/traffic-control/examples/pi-square-example.cc ('k') | src/traffic-control/examples/wscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/traffic-control/examples/red-tests.cc
===================================================================
--- a/src/traffic-control/examples/red-tests.cc
+++ b/src/traffic-control/examples/red-tests.cc
@@ -22,8 +22,8 @@
/**
* These validation tests are detailed in http://icir.org/floyd/papers/redsims.ps
*
- * In this code the tests 1, 3, 4 and 5 refer to the tests corresponding to
- * Figure 1, 3, 4, and 5 respectively from the document mentioned above.
+ * In this code the tests 1, 2, 3, 4 and 5 refer to the tests corresponding to
+ * Figure 1, 2, 3, 4, and 5 respectively from the document mentioned above.
*/
/** Network topology
@@ -99,7 +99,7 @@
void
BuildAppsTest (uint32_t test)
{
- if ( (test == 1) || (test == 3) )
+ if ( (test == 1) || (test == 2) || (test == 3) )
{
// SINK is in the right side
uint16_t port = 50000;
@@ -280,16 +280,16 @@
// Will only save in the directory if enable opts below
pathOut = "."; // Current directory
CommandLine cmd;
- cmd.AddValue ("testNumber", "Run test 1, 3, 4 or 5", redTest);
+ cmd.AddValue ("testNumber", "Run test 1, 2, 3, 4 or 5", redTest);
cmd.AddValue ("pathOut", "Path to save results from --writeForPlot/--writePcap/--writeFlowMonitor", pathOut);
cmd.AddValue ("writeForPlot", "<0/1> to write results for plot (gnuplot)", writeForPlot);
cmd.AddValue ("writePcap", "<0/1> to write results in pcapfile", writePcap);
cmd.AddValue ("writeFlowMonitor", "<0/1> to enable Flow Monitor and write their results", flowMonitor);
cmd.Parse (argc, argv);
- if ( (redTest != 1) && (redTest != 3) && (redTest != 4) && (redTest != 5) )
+ if ( (redTest != 1) && (redTest != 2) && (redTest != 3) && (redTest != 4) && (redTest != 5) )
{
- NS_ABORT_MSG ("Invalid test number. Supported tests are 1, 3, 4 or 5");
+ NS_ABORT_MSG ("Invalid test number. Supported tests are 1, 2, 3, 4 or 5");
}
NS_LOG_INFO ("Create nodes");
@@ -326,7 +326,12 @@
Config::SetDefault ("ns3::RedQueueDisc::MaxTh", DoubleValue (15));
Config::SetDefault ("ns3::RedQueueDisc::QueueLimit", UintegerValue (1000));
- if (redTest == 3) // test like 1, but with bad params
+ if (redTest == 2) // test like 1, but with ecn
+ {
+ Config::SetDefault ("ns3::TcpSocketBase::UseEcn", BooleanValue (true));
+ Config::SetDefault ("ns3::RedQueueDisc::UseEcn", BooleanValue (true));
+ }
+ else if (redTest == 3) // test like 1, but with bad params
{
Config::SetDefault ("ns3::RedQueueDisc::MaxTh", DoubleValue (10));
Config::SetDefault ("ns3::RedQueueDisc::QW", DoubleValue (0.003));
@@ -461,13 +466,17 @@
RedQueueDisc::Stats st = StaticCast<RedQueueDisc> (queueDiscs.Get (0))->GetStats ();
std::cout << "*** RED stats from Node 2 queue ***" << std::endl;
std::cout << "\t " << st.unforcedDrop << " drops due prob mark" << std::endl;
+ std::cout << "\t " << st.unforcedMark << " marks due prob mark" << std::endl;
std::cout << "\t " << st.forcedDrop << " drops due hard mark" << std::endl;
+ std::cout << "\t " << st.forcedMark << " drops due hard mark" << std::endl;
std::cout << "\t " << st.qLimDrop << " drops due queue full" << std::endl;
st = StaticCast<RedQueueDisc> (queueDiscs.Get (1))->GetStats ();
std::cout << "*** RED stats from Node 3 queue ***" << std::endl;
std::cout << "\t " << st.unforcedDrop << " drops due prob mark" << std::endl;
+ std::cout << "\t " << st.unforcedMark << " marks due prob mark" << std::endl;
std::cout << "\t " << st.forcedDrop << " drops due hard mark" << std::endl;
+ std::cout << "\t " << st.forcedMark << " drops due hard mark" << std::endl;
std::cout << "\t " << st.qLimDrop << " drops due queue full" << std::endl;
}
« no previous file with comments | « src/traffic-control/examples/pi-square-example.cc ('k') | src/traffic-control/examples/wscript » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b