Bug 457 - [contribution] drop tail queue with byte limits
: [contribution] drop tail queue with byte limits
Status: RESOLVED FIXED
: ns-3
node module
: ns-3-dev
: All All
: P3 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-12-31 18:08 EDT by
Modified: 2009-02-19 01:20 EDT (History)


Attachments
src files (2.16 KB, application/x-zip-compressed)
2008-12-31 18:08 EDT, Salik Syed
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-12-31 18:08:03 EDT
Created an attachment (id=344) [details]
src files 

I've attached the files below -- basically it's a droptailqueue which uses the
cumulative number of bytes in the queue rather than number of packets when
deciding whether or not to drop packets. I know it's very simple change to make
took like 5 min but figured this might be useful
------- Comment #1 From 2009-01-02 10:39:36 EDT -------
(In reply to comment #0)
> Created an attachment (id=344) [details] [details]
> src files 
> 
> I've attached the files below -- basically it's a droptailqueue which uses the
> cumulative number of bytes in the queue rather than number of packets when
> deciding whether or not to drop packets. I know it's very simple change to make
> took like 5 min but figured this might be useful
> 

I would be OK with this class but since it is such a simple change to
DropTailQueue I wonder whether it should just be added as a mode of operation
of the existing class.

Another possibility along such lines would be to define a private virtual
CheckOverflow (Ptr <const Packet> p) that could be used as follows:

bool
DropTailQueue::DoEnqueue (Ptr<Packet> p)
{
  NS_LOG_FUNCTION (this << p);

-  if (m_packets.size () >= m_maxPackets)
+  if (CheckOverflow (p))
    {
      NS_LOG_LOGIC ("Queue full -- droppping pkt");

and then, put the policy into CheckOverflow whether it checks a packet counter
or running byte counter.  This could be enabled by two attributes such as
"byteLimit" (default false) and "maxBytes".
------- Comment #2 From 2009-01-19 01:48:57 EDT -------
Assigning to src/node maintainer to review and mark priority.