diff --git a/CHANGES.html b/CHANGES.html
index 4e901fded..799e31dfa 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -187,6 +187,8 @@ is now exported by WifiNetDevice.
Queue discs that can operate both in packet mode and byte mode (Red, CoDel, Pie) define their own
enum QueueDiscMode instead of using QueueBase::QueueMode.
+The CoDel, PIE and RED queue discs require that the size of the internal queue is the same as
+ the queue disc limit (previously, it was allowed to be greater than or equal).
The default value of the EnableBeaconJitter attribute in ApWifiMac was changed from false to true.
diff --git a/examples/traffic-control/traffic-control.cc b/examples/traffic-control/traffic-control.cc
index 7a0fd1168..5042b977e 100644
--- a/examples/traffic-control/traffic-control.cc
+++ b/examples/traffic-control/traffic-control.cc
@@ -119,9 +119,7 @@ main (int argc, char *argv[])
stack.Install (nodes);
TrafficControlHelper tch;
- uint16_t handle = tch.SetRootQueueDisc ("ns3::RedQueueDisc");
- // Add the internal queue used by Red
- tch.AddInternalQueues (handle, 1, "ns3::DropTailQueue", "MaxPackets", UintegerValue (10000));
+ tch.SetRootQueueDisc ("ns3::RedQueueDisc");
QueueDiscContainer qdiscs = tch.Install (devices);
Ptr q = qdiscs.Get (1);
diff --git a/src/traffic-control/model/codel-queue-disc.cc b/src/traffic-control/model/codel-queue-disc.cc
index 257fdd6a8..f151c9f8d 100644
--- a/src/traffic-control/model/codel-queue-disc.cc
+++ b/src/traffic-control/model/codel-queue-disc.cc
@@ -528,10 +528,10 @@ CoDelQueueDisc::CheckConfig (void)
return false;
}
- if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () < m_maxPackets) ||
- (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () < m_maxBytes))
+ if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () != m_maxPackets) ||
+ (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () != m_maxBytes))
{
- NS_LOG_ERROR ("The size of the internal queue is less than the queue disc limit");
+ NS_LOG_ERROR ("The size of the internal queue differs from the queue disc limit");
return false;
}
diff --git a/src/traffic-control/model/pie-queue-disc.cc b/src/traffic-control/model/pie-queue-disc.cc
index 4bffd3318..dc4a067fe 100644
--- a/src/traffic-control/model/pie-queue-disc.cc
+++ b/src/traffic-control/model/pie-queue-disc.cc
@@ -524,10 +524,10 @@ PieQueueDisc::CheckConfig (void)
return false;
}
- if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () < m_queueLimit)
- || (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () < m_queueLimit))
+ if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () != m_queueLimit)
+ || (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () != m_queueLimit))
{
- NS_LOG_ERROR ("The size of the internal queue is less than the queue disc limit");
+ NS_LOG_ERROR ("The size of the internal queue differs from the queue disc limit");
return false;
}
diff --git a/src/traffic-control/model/red-queue-disc.cc b/src/traffic-control/model/red-queue-disc.cc
index 49791b8e5..c31a7f4d8 100644
--- a/src/traffic-control/model/red-queue-disc.cc
+++ b/src/traffic-control/model/red-queue-disc.cc
@@ -973,10 +973,10 @@ RedQueueDisc::CheckConfig (void)
return false;
}
- if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () < m_queueLimit) ||
- (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () < m_queueLimit))
+ if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () != m_queueLimit) ||
+ (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () != m_queueLimit))
{
- NS_LOG_ERROR ("The size of the internal queue is less than the queue disc limit");
+ NS_LOG_ERROR ("The size of the internal queue differs from the queue disc limit");
return false;
}