traffic-control: Be more restrictive on internal queue size
This commit is contained in:
@@ -187,6 +187,8 @@ is now exported by WifiNetDevice.</li>
|
||||
<li>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.
|
||||
</li>
|
||||
<li>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).
|
||||
</li>
|
||||
<li> The default value of the <b>EnableBeaconJitter</b> attribute in ApWifiMac was changed from false to true.
|
||||
</li>
|
||||
|
||||
@@ -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<QueueDisc> q = qdiscs.Get (1);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user