Skip to content

Commit f613cf3

Browse files
committed
Removed all usages of m_cautious
1 parent 0626f46 commit f613cf3

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

src/traffic-control/model/red-queue-disc.cc

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ RedQueueDisc::InitializeParams (void)
445445
NS_LOG_FUNCTION (this);
446446
NS_LOG_INFO ("Initializing RED params.");
447447

448-
m_cautious = 0;
449448
m_ptc = m_linkBandwidth.GetBitRate () / (8.0 * m_meanPktSize);
450449

451450
if (m_isARED)
@@ -645,44 +644,8 @@ RedQueueDisc::DropEarly (Ptr<QueueDiscItem> item, uint32_t qSize)
645644
646645
double prob1 = CalculatePNew ();
647646
m_vProb = ModifyP (prob1, item->GetSize ());
648-
649-
// Drop probability is computed, pick random number and act
650-
if (m_cautious == 1)
651-
{
652-
/*
653-
* Don't drop/mark if the instantaneous queue is much below the average.
654-
* For experimental purposes only.
655-
* pkts: the number of packets arriving in 50 ms
656-
*/
657-
double pkts = m_ptc * 0.05;
658-
double fraction = std::pow ((1 - m_qW), pkts);
659-
660-
if ((double) qSize < fraction * m_qAvg)
661-
{
662-
// Queue could have been empty for 0.05 seconds
663-
return 0;
664-
}
665-
}
666-
667647
double u = m_uv->GetValue ();
668648
669-
if (m_cautious == 2)
670-
{
671-
/*
672-
* Decrease the drop probability if the instantaneous
673-
* queue is much below the average.
674-
* For experimental purposes only.
675-
* pkts: the number of packets arriving in 50 ms
676-
*/
677-
double pkts = m_ptc * 0.05;
678-
double fraction = std::pow ((1 - m_qW), pkts);
679-
double ratio = qSize / (fraction * m_qAvg);
680-
681-
if (ratio < 1.0)
682-
{
683-
u *= 1.0 / ratio;
684-
}
685-
}
686649
687650
if (u <= m_vProb)
688651
{

src/traffic-control/model/red-queue-disc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ class RedQueueDisc : public QueueDisc
308308
* 2 experimental (see red-queue-disc.cc)
309309
* 3 use Idle packet size in the ptc
310310
*/
311-
uint32_t m_cautious;
312311
Time m_idleTime; //!< Start of current idle period
313312

314313
Ptr<UniformRandomVariable> m_uv; //!< rng stream

0 commit comments

Comments
 (0)