View | Details | Raw Unified | Return to bug 2745
Collapse All | Expand All

(-)a/src/traffic-control/model/red-queue-disc.cc (-10 / +10 lines)
 Lines 430-438    Link Here 
430
        {
430
        {
431
          /* 
431
          /* 
432
           * The average queue size has just crossed the
432
           * The average queue size has just crossed the
433
           * threshold from below to above "minthresh", or
433
           * threshold from below to above m_minTh, or
434
           * from above "minthresh" with an empty queue to
434
           * from above m_minTh with an empty queue to
435
           * above "minthresh" with a nonempty queue.
435
           * above m_minTh with a nonempty queue.
436
           */
436
           */
437
          m_count = 1;
437
          m_count = 1;
438
          m_countBytes = item->GetSize ();
438
          m_countBytes = item->GetSize ();
 Lines 700-706    Link Here 
700
    }
700
    }
701
  else if (m_isFengAdaptive)
701
  else if (m_isFengAdaptive)
702
    {
702
    {
703
      UpdateMaxPFeng (newAve);  // Update MaxP in MIMD fashion.
703
      UpdateMaxPFeng (newAve);  // Update m_curMaxP in MIMD fashion.
704
    }
704
    }
705
705
706
  return newAve;
706
  return newAve;
 Lines 777-791    Link Here 
777
777
778
  if (m_isGentle && m_qAvg >= m_maxTh)
778
  if (m_isGentle && m_qAvg >= m_maxTh)
779
    {
779
    {
780
      // p ranges from maxP to 1 as the average queue
780
      // p ranges from m_curMaxP to 1 as the average queue
781
      // Size ranges from maxTh to twice maxTh
781
      // size ranges from m_maxTh to twice m_maxTh
782
      p = m_vC * m_qAvg + m_vD;
782
      p = m_vC * m_qAvg + m_vD;
783
    }
783
    }
784
  else if (!m_isGentle && m_qAvg >= m_maxTh)
784
  else if (!m_isGentle && m_qAvg >= m_maxTh)
785
    {
785
    {
786
      /* 
786
      /* 
787
       * OLD: p continues to range linearly above max_p as
787
       * OLD: p continues to range linearly above m_curMaxP as
788
       * the average queue size ranges above th_max.
788
       * the average queue size ranges above m_maxTh.
789
       * NEW: p is set to 1.0
789
       * NEW: p is set to 1.0
790
       */
790
       */
791
      p = 1.0;
791
      p = 1.0;
 Lines 793-800    Link Here 
793
  else
793
  else
794
    {
794
    {
795
      /*
795
      /*
796
       * p ranges from 0 to max_p as the average queue size ranges from
796
       * p ranges from 0 to m_curMaxP as the average queue size ranges from
797
       * th_min to th_max
797
       * m_minTh to m_maxTh
798
       */
798
       */
799
      p = m_vA * m_qAvg + m_vB;
799
      p = m_vA * m_qAvg + m_vB;
800
800
(-)a/src/traffic-control/model/red-queue-disc.h (-5 / +5 lines)
 Lines 114-123    Link Here 
114
  typedef struct
114
  typedef struct
115
  {   
115
  {   
116
    uint32_t unforcedDrop;  //!< Early probability drops
116
    uint32_t unforcedDrop;  //!< Early probability drops
117
    uint32_t forcedDrop;    //!< Forced drops, qavg > max threshold
117
    uint32_t forcedDrop;    //!< Forced drops, m_qAvg > m_maxTh
118
    uint32_t qLimDrop;      //!< Drops due to queue limits
118
    uint32_t qLimDrop;      //!< Drops due to queue limits
119
    uint32_t unforcedMark;  //!< Early probability marks
119
    uint32_t unforcedMark;  //!< Early probability marks
120
    uint32_t forcedMark;    //!< Forced marks, qavg > max threshold
120
    uint32_t forcedMark;    //!< Forced marks, m_qAvg > m_maxTh
121
  } Stats;
121
  } Stats;
122
122
123
  /** 
123
  /** 
 Lines 316-326    Link Here 
316
  uint32_t m_meanPktSize;   //!< Avg pkt size
316
  uint32_t m_meanPktSize;   //!< Avg pkt size
317
  uint32_t m_idlePktSize;   //!< Avg pkt size used during idle times
317
  uint32_t m_idlePktSize;   //!< Avg pkt size used during idle times
318
  bool m_isWait;            //!< True for waiting between dropped packets
318
  bool m_isWait;            //!< True for waiting between dropped packets
319
  bool m_isGentle;          //!< True to increases dropping prob. slowly when ave queue exceeds maxthresh
319
  bool m_isGentle;          //!< True to increase dropping prob. slowly when m_qAvg exceeds m_maxTh
320
  bool m_isARED;            //!< True to enable Adaptive RED
320
  bool m_isARED;            //!< True to enable Adaptive RED
321
  bool m_isAdaptMaxP;       //!< True to adapt m_curMaxP
321
  bool m_isAdaptMaxP;       //!< True to adapt m_curMaxP
322
  double m_minTh;           //!< Min avg length threshold (bytes)
322
  double m_minTh;           //!< Minimum threshold for m_qAvg (bytes or packets)
323
  double m_maxTh;           //!< Max avg length threshold (bytes), should be >= 2*minTh
323
  double m_maxTh;           //!< Maximum threshold for m_qAvg (bytes or packets), should be >= 2 * m_minTh
324
  uint32_t m_queueLimit;    //!< Queue limit in bytes / packets
324
  uint32_t m_queueLimit;    //!< Queue limit in bytes / packets
325
  double m_qW;              //!< Queue weight given to cur queue size sample
325
  double m_qW;              //!< Queue weight given to cur queue size sample
326
  double m_lInterm;         //!< The max probability of dropping a packet
326
  double m_lInterm;         //!< The max probability of dropping a packet

Return to bug 2745