traffic-control: (fixes #2512, #2590) Various small fixes regarding the RED queue disc

This commit is contained in:
Mohit P. Tahiliani
2017-01-09 20:01:36 +01:00
parent bde2a0315e
commit 3b85d0da5b
4 changed files with 13 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ Bugs fixed
- Bug 2485 - Check for queue full should happen before checking RED thresholds
- Bug 2492 - uan: Make use of RxGain attribute in UanPhyGen class
- Bug 2511 - HT Greenfield is not working
- Bug 2512 - Byte mode not configured correctly in red-queue-disc-test-suite.cc
- Bug 2513 - ParetoRandomVariable needs a "scale", not a "mean" attribute.
- Bug 2521 - Include ipv6-option.h in wscript
- Bug 2527 - PrintRoutingTable extended to add an optional Time::Units parameter
@@ -56,6 +57,7 @@ Bugs fixed
- Bug 2566 - BlockAckManager::GetNRetryNeededPackets missing some packets in the queue
- Bug 2577 - simulation crashes when A-MPDU and multiple TOS are used with RTS-CTS enabled
- Bug 2584 - MacLow triggers StartNext even if there is no TXOP
- Bug 2590 - Minor enhancements in red-queue-disc{.h, .cc}
- Bug 2591 - 802.11e Block Ack mechanism cannot be enabled on HT/VHT stations
- Bug 2594 - vht-wifi-network provides very low throughtput at MCS 6, 160 MHz, SGI
- Bug 2614 - RIP header version should be set to 2

View File

@@ -569,8 +569,11 @@ RedQueueDisc::InitializeParams (void)
// Update m_curMaxP to keep the average queue length within the target range.
void
RedQueueDisc::UpdateMaxP (double newAve, Time now)
RedQueueDisc::UpdateMaxP (double newAve)
{
NS_LOG_FUNCTION (this << newAve);
Time now = Simulator::Now ();
double m_part = 0.4 * (m_maxTh - m_minTh);
// AIMD rule to keep target Q~1/2(m_minTh + m_maxTh)
if (newAve < m_minTh + m_part && m_curMaxP > m_bottom)
@@ -601,10 +604,10 @@ RedQueueDisc::Estimator (uint32_t nQueued, uint32_t m, double qAvg, double qW)
double newAve = qAvg * pow(1.0-qW, m);
newAve += qW * nQueued;
Time now = Simulator::Now();
Time now = Simulator::Now ();
if (m_isAdaptMaxP && now > m_lastSet + m_interval)
{
UpdateMaxP(newAve, now);
UpdateMaxP(newAve);
}
return newAve;

View File

@@ -66,7 +66,6 @@
#include "ns3/nstime.h"
#include "ns3/boolean.h"
#include "ns3/data-rate.h"
#include "ns3/nstime.h"
#include "ns3/random-variable-stream.h"
namespace ns3 {
@@ -238,9 +237,8 @@ private:
/**
* \brief Update m_curMaxP
* \param newAve new average queue length
* \param now Current Time
*/
void UpdateMaxP (double newAve, Time now);
void UpdateMaxP (double newAve);
/**
* \brief Check if a packet needs to be dropped due to probability mark
* \param item queue item
@@ -320,8 +318,8 @@ private:
uint32_t m_count; //!< Number of packets since last random number generation
/**
* 0 for default RED
* 1 experimental (see red-queue.cc)
* 2 experimental (see red-queue.cc)
* 1 experimental (see red-queue-disc.cc)
* 2 experimental (see red-queue-disc.cc)
* 3 use Idle packet size in the ptc
*/
uint32_t m_cautious;

View File

@@ -112,7 +112,8 @@ RedQueueDiscTestCase::RunRedTest (StringValue mode)
if (queue->GetMode () == Queue::QUEUE_MODE_BYTES)
{
pktSize = 1000;
// pktSize should be same as MeanPktSize to avoid performance gap between byte and packet mode
pktSize = 500;
modeSize = pktSize;
queue->SetTh (minTh * modeSize, maxTh * modeSize);
queue->SetQueueLimit (qSize * modeSize);