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

(-)a/src/traffic-control/model/red-queue-disc.cc (-9 / +8 lines)
 Lines 349-355    Link Here 
349
  m_countBytes += item->GetPacketSize ();
349
  m_countBytes += item->GetPacketSize ();
350
350
351
  uint32_t dropType = DTYPE_NONE;
351
  uint32_t dropType = DTYPE_NONE;
352
  if (m_qAvg >= m_minTh && nQueued > 1)
352
  if ((GetMode () == Queue::QUEUE_MODE_PACKETS && nQueued >= m_queueLimit) ||
353
      (GetMode () == Queue::QUEUE_MODE_BYTES && nQueued + item->GetPacketSize() > m_queueLimit))
354
    {
355
      NS_LOG_DEBUG ("\t Dropping due to Queue Full " << nQueued);
356
      dropType = DTYPE_FORCED;
357
      m_stats.qLimDrop++;
358
    }
359
  else if (m_qAvg >= m_minTh && nQueued > 1)
353
    {
360
    {
354
      if ((!m_isGentle && m_qAvg >= m_maxTh) ||
361
      if ((!m_isGentle && m_qAvg >= m_maxTh) ||
355
          (m_isGentle && m_qAvg >= 2 * m_maxTh))
362
          (m_isGentle && m_qAvg >= 2 * m_maxTh))
 Lines 382-395    Link Here 
382
      m_old = 0;
389
      m_old = 0;
383
    }
390
    }
384
391
385
  if ((GetMode () == Queue::QUEUE_MODE_PACKETS && nQueued >= m_queueLimit) ||
386
      (GetMode () == Queue::QUEUE_MODE_BYTES && nQueued + item->GetPacketSize() > m_queueLimit))
387
    {
388
      NS_LOG_DEBUG ("\t Dropping due to Queue Full " << nQueued);
389
      dropType = DTYPE_FORCED;
390
      m_stats.qLimDrop++;
391
    }
392
393
  if (dropType == DTYPE_UNFORCED)
392
  if (dropType == DTYPE_UNFORCED)
394
    {
393
    {
395
      NS_LOG_DEBUG ("\t Dropping due to Prob Mark " << m_qAvg);
394
      NS_LOG_DEBUG ("\t Dropping due to Prob Mark " << m_qAvg);

Return to bug 2485