Hi,
Sorry for the wide distribution, but I seem to be rather confused about the new Queue Discs that are replacing several queue types, including Red Queues in the upcoming release of ns-3.25. In my original setup, I have a bunch of PointToPoint net devices, which used RedQueues as their underlying queue.
With the new changes, it doesn’t seem like I can do that, rather I must use DropTailQueues for the net device, and use a Traffic Controller with a RedQueueDisc.
I had naively thought the setup above would behave exactly like my old setup, but in fact it doesn’t. It behaves like I have DropTailQueues and not RedQueues, which I guess is expected.
So, I guess my question is: what are queuing disciplines and how can I get my code to behave like I intend, i.e. PointToPoint net devices with RedQueues?
Cheers,
Lynne
GetInternalQueue (0)->Enqueue (item);
But the check in DropTailQueue to see whether the bytes exceed the max take the current packet into consideration, which the RedQueue doesn't. I.e. I get a drop.
I'm not sure if this is the right behaviour.
Thanks,
Lynne
if (nQueued >= m_queueLimit)
{
...
dropType = DTYPE_FORCED;
}
But the check in the underlying drop tail queue is:
if (m_mode == QUEUE_MODE_BYTES && (m_nBytes.Get () + item->GetPacketSize () > m_maxBytes))
{
}
In other words, although the first check indicates that we can in fact queue an item, the underlying queue actually drops it.
Cheers,
Lynne
In the PointToPoint net device, if the enqueue causes a drop, is it correct that the packet is requeued?
If so, then using the MaxTxDrop trace point of the net device is no longer accurate to reflect actual drops.
In the RedQueueDisc code, I am seeing the following behaviour:The RED queue indicates that there are no drops and it is possible to enqueue a packet, then it calls the underlying DropTailQueue, i.e.GetInternalQueue (0)->Enqueue (item);
But the check in DropTailQueue to see whether the bytes exceed the max take the current packet into consideration, which the RedQueue doesn't. I.e. I get a drop.
Hi Steffano,I think my second point is an actual bug. I am using the bytes mode of the queue, and in the RedQueueDisc Enqueue method we have this check:if (nQueued >= m_queueLimit)
{
...
dropType = DTYPE_FORCED;
}
But the check in the underlying drop tail queue is:
if (m_mode == QUEUE_MODE_BYTES && (m_nBytes.Get () + item->GetPacketSize () > m_maxBytes))
{
}
In other words, although the first check indicates that we can in fact queue an item, the underlying queue actually drops it.
+ if (nQueued + item->GetPacketSize() >= m_queueLimit)
Thanks Stefano for clarifying things.You're right about this bug existing in the old versions of RedQueue. I'm hoping this gets fixed in ns-3.25, mostly because, even though the packet gets correctly dropped, a developer will need to add trace points to catch drops in both the Queue class and the RedQueueDisc class to catch all drops correctly. Do you mind cc-ing me on the bug report?In the mean time, I have locally modified my code to do the following:- if (nQueued >= m_queueLimit)+ if (nQueued + item->GetPacketSize() >= m_queueLimit)
Would this be a better fix?- if (nQueued >= m_queueLimit)+ if ((GetMode () == Queue::QUEUE_MODE_PACKETS && nQueued >= m_queueLimit) ||
+ (GetMode () == Queue::QUEUE_MODE_BYTES && nQueued + item->GetPacketSize() > m_queueLimit))