@@ -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 {
0 commit comments