From 8b6440d3bc398649e6814bfa911332d5cfae5160 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 20 Jan 2017 17:20:36 +0100 Subject: [PATCH] examples: (fixes #2557) Fix dead assignments in queue-discs-benchmark (thanks to Natale Patriciello) --- examples/traffic-control/queue-discs-benchmark.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/traffic-control/queue-discs-benchmark.cc b/examples/traffic-control/queue-discs-benchmark.cc index 9fd9a5a1d..0b99c68f7 100644 --- a/examples/traffic-control/queue-discs-benchmark.cc +++ b/examples/traffic-control/queue-discs-benchmark.cc @@ -145,7 +145,7 @@ int main (int argc, char *argv[]) // Access link traffic control configuration TrafficControlHelper tchPfifoFastAccess; - uint32_t handle = tchPfifoFastAccess.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", UintegerValue (1000)); + tchPfifoFastAccess.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "Limit", UintegerValue (1000)); // Bottleneck link traffic control configuration TrafficControlHelper tchBottleneck; @@ -156,27 +156,27 @@ int main (int argc, char *argv[]) } else if (queueDiscType.compare ("ARED") == 0) { - handle = tchBottleneck.SetRootQueueDisc ("ns3::RedQueueDisc"); + tchBottleneck.SetRootQueueDisc ("ns3::RedQueueDisc"); Config::SetDefault ("ns3::RedQueueDisc::ARED", BooleanValue (true)); Config::SetDefault ("ns3::RedQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS)); Config::SetDefault ("ns3::RedQueueDisc::QueueLimit", UintegerValue (queueDiscSize)); } else if (queueDiscType.compare ("CoDel") == 0) { - handle = tchBottleneck.SetRootQueueDisc ("ns3::CoDelQueueDisc"); + tchBottleneck.SetRootQueueDisc ("ns3::CoDelQueueDisc"); Config::SetDefault ("ns3::CoDelQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS)); Config::SetDefault ("ns3::CoDelQueueDisc::MaxPackets", UintegerValue (queueDiscSize)); } else if (queueDiscType.compare ("FqCoDel") == 0) { - handle = tchBottleneck.SetRootQueueDisc ("ns3::FqCoDelQueueDisc"); - Config::SetDefault ("ns3::FqCoDelQueueDisc::Packet limit", UintegerValue (queueDiscSize)); + uint32_t handle = tchBottleneck.SetRootQueueDisc ("ns3::FqCoDelQueueDisc"); + Config::SetDefault ("ns3::FqCoDelQueueDisc::PacketLimit", UintegerValue (queueDiscSize)); tchBottleneck.AddPacketFilter (handle, "ns3::FqCoDelIpv4PacketFilter"); tchBottleneck.AddPacketFilter (handle, "ns3::FqCoDelIpv6PacketFilter"); } else if (queueDiscType.compare ("PIE") == 0) { - handle = tchBottleneck.SetRootQueueDisc ("ns3::PieQueueDisc"); + tchBottleneck.SetRootQueueDisc ("ns3::PieQueueDisc"); Config::SetDefault ("ns3::PieQueueDisc::Mode", EnumValue (Queue::QUEUE_MODE_PACKETS)); Config::SetDefault ("ns3::PieQueueDisc::QueueLimit", UintegerValue (queueDiscSize)); }