traffic-control: Improve comments in RED
This commit is contained in:
@@ -430,9 +430,9 @@ RedQueueDisc::DoEnqueue (Ptr<QueueDiscItem> item)
|
||||
{
|
||||
/*
|
||||
* The average queue size has just crossed the
|
||||
* threshold from below to above "minthresh", or
|
||||
* from above "minthresh" with an empty queue to
|
||||
* above "minthresh" with a nonempty queue.
|
||||
* threshold from below to above m_minTh, or
|
||||
* from above m_minTh with an empty queue to
|
||||
* above m_minTh with a nonempty queue.
|
||||
*/
|
||||
m_count = 1;
|
||||
m_countBytes = item->GetSize ();
|
||||
@@ -700,7 +700,7 @@ RedQueueDisc::Estimator (uint32_t nQueued, uint32_t m, double qAvg, double qW)
|
||||
}
|
||||
else if (m_isFengAdaptive)
|
||||
{
|
||||
UpdateMaxPFeng (newAve); // Update MaxP in MIMD fashion.
|
||||
UpdateMaxPFeng (newAve); // Update m_curMaxP in MIMD fashion.
|
||||
}
|
||||
|
||||
return newAve;
|
||||
@@ -777,15 +777,15 @@ RedQueueDisc::CalculatePNew (void)
|
||||
|
||||
if (m_isGentle && m_qAvg >= m_maxTh)
|
||||
{
|
||||
// p ranges from maxP to 1 as the average queue
|
||||
// Size ranges from maxTh to twice maxTh
|
||||
// p ranges from m_curMaxP to 1 as the average queue
|
||||
// size ranges from m_maxTh to twice m_maxTh
|
||||
p = m_vC * m_qAvg + m_vD;
|
||||
}
|
||||
else if (!m_isGentle && m_qAvg >= m_maxTh)
|
||||
{
|
||||
/*
|
||||
* OLD: p continues to range linearly above max_p as
|
||||
* the average queue size ranges above th_max.
|
||||
* OLD: p continues to range linearly above m_curMaxP as
|
||||
* the average queue size ranges above m_maxTh.
|
||||
* NEW: p is set to 1.0
|
||||
*/
|
||||
p = 1.0;
|
||||
@@ -793,8 +793,8 @@ RedQueueDisc::CalculatePNew (void)
|
||||
else
|
||||
{
|
||||
/*
|
||||
* p ranges from 0 to max_p as the average queue size ranges from
|
||||
* th_min to th_max
|
||||
* p ranges from 0 to m_curMaxP as the average queue size ranges from
|
||||
* m_minTh to m_maxTh
|
||||
*/
|
||||
p = m_vA * m_qAvg + m_vB;
|
||||
|
||||
|
||||
@@ -114,10 +114,10 @@ public:
|
||||
typedef struct
|
||||
{
|
||||
uint32_t unforcedDrop; //!< Early probability drops
|
||||
uint32_t forcedDrop; //!< Forced drops, qavg > max threshold
|
||||
uint32_t forcedDrop; //!< Forced drops, m_qAvg > m_maxTh
|
||||
uint32_t qLimDrop; //!< Drops due to queue limits
|
||||
uint32_t unforcedMark; //!< Early probability marks
|
||||
uint32_t forcedMark; //!< Forced marks, qavg > max threshold
|
||||
uint32_t forcedMark; //!< Forced marks, m_qAvg > m_maxTh
|
||||
} Stats;
|
||||
|
||||
/**
|
||||
@@ -316,11 +316,11 @@ private:
|
||||
uint32_t m_meanPktSize; //!< Avg pkt size
|
||||
uint32_t m_idlePktSize; //!< Avg pkt size used during idle times
|
||||
bool m_isWait; //!< True for waiting between dropped packets
|
||||
bool m_isGentle; //!< True to increases dropping prob. slowly when ave queue exceeds maxthresh
|
||||
bool m_isGentle; //!< True to increase dropping prob. slowly when m_qAvg exceeds m_maxTh
|
||||
bool m_isARED; //!< True to enable Adaptive RED
|
||||
bool m_isAdaptMaxP; //!< True to adapt m_curMaxP
|
||||
double m_minTh; //!< Min avg length threshold (bytes)
|
||||
double m_maxTh; //!< Max avg length threshold (bytes), should be >= 2*minTh
|
||||
double m_minTh; //!< Minimum threshold for m_qAvg (bytes or packets)
|
||||
double m_maxTh; //!< Maximum threshold for m_qAvg (bytes or packets), should be >= 2 * m_minTh
|
||||
uint32_t m_queueLimit; //!< Queue limit in bytes / packets
|
||||
double m_qW; //!< Queue weight given to cur queue size sample
|
||||
double m_lInterm; //!< The max probability of dropping a packet
|
||||
|
||||
Reference in New Issue
Block a user