Bug 2660

Summary: TrafficControlHelper::Default should not configure internal queue sizes
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: traffic-controlAssignee: Stefano Avallone <stavallo>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P3    
Version: unspecified   
Hardware: All   
OS: All   

Description Tom Henderson 2017-02-23 23:40:04 UTC
Use of the TrafficControlHelper::Default() method will apply a pfifo_fast qdisc with 1000 packet depth in each band.  However, if user tries to configure the default value for PfifoFastQueueDisc::MaxPackets, it will not get applied, and the  CheckConfig() method will report an error if the MaxPackets value exceeds 1000.

The solution is simple; allow CheckConfig() to instantiate the internal queues, and assign MaxPackets there.

--- a/src/traffic-control/helper/traffic-control-helper.cc
+++ b/src/traffic-control/helper/traffic-control-helper.cc
@@ -110,8 +110,7 @@ TrafficControlHelper
 TrafficControlHelper::Default (void)
 {
   TrafficControlHelper helper;
-  uint16_t handle = helper.SetRootQueueDisc ("ns3::PfifoFastQueueDisc");
-  helper.AddInternalQueues (handle, 3, "ns3::DropTailQueue", "MaxPackets", UintegerValue (1000));
+  helper.SetRootQueueDisc ("ns3::PfifoFastQueueDisc");
   return helper;
 }
Comment 1 Stefano Avallone 2017-02-24 08:43:07 UTC
Fixed with changeset 12710:d4e7d5d01670, thanks!