[Ns-developers] [bug] Differentiated Services module - RED algorithm
Sally Floyd
sallyfloyd at mac.com
Thu Dec 13 15:29:35 PST 2007
Miklos -
> I think there is a bug in the DiffServ module of ns (version 2.32),
> namely
> in the implemetation of the RED algorithm. In my opinion the wrong
> line is
> in file diffserv/dsredq.cc line number 239 in function redQueue::enque
> :
>
> "return PKT_DROPPED;"
>
> This is the case when the RED drops a packet because the average queue
> is
> greater than the max. threshold. I think the above line should be
> "return
> PKT_EDROPPED;" because PKT_DROPPED should happen only when the link
> drops a
> packet. When the RED algorithm drops a packet it should be early drop
> (PKT_EDROPPED).
>
> Please let me know if I am right or not.
Looking at the diffserv code (which I have never looked at before),
PKT_EDROPPED is there so that the flowmonitor can monitor
early drops.
/
*-----------------------------------------------------------------------
------
void edrop(Packet* pkt)
This method is used so that flowmonitor can monitor early drops.
------------------------------------------------------------------------
-----*/
But without knowing what the flow monitor is *doing* with
the early drops that it is counting, it is hard to tell whether
it would include packets dropped when the average queue size
is greater than maxthresh, or not.
From a quick glance, it would seem that the RED in the diffserv
code doesn't use gentle mode, so all packets that arrive
when the average queue is greater than maxthresh are dropped.
That is, although these are still early drops, they aren't a good
statistical sample of the arriving traffic.
- Sally
http://www.icir.org/floyd/
More information about the Ns-developers
mailing list