[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Re: your mail



On Thu, 19 Jul 2001, Miss Pennatee Rohitsatian wrote:

> I go through the c++ code of Nortel's Diffserv module
> (file : dsredq.cc) as following. 

ditto for latest version in cvs.

http://www.isi.edu/cgi-bin/nsnam/cvsweb/ns-2/diffserv/dsredq.cc?rev=1.3

> I think maybe there are 
> some error in the method for calculating average queue 
> of WRED algoritm.  
> 
> void redQueue::calcAvg(int prec, int m) {
> 	...
> 	
>    if (mredMode == wred)
>       for (i = 0; i < numPrec; i ++)
> 	qParam_[prec].edv_.v_ave = f;
>                 ...
> }
> 
> Variable 'prec' in for loop should be place by 'i' to make
> all codepoint have same average queue value if mode is WRED.
> 
> Can anyone check and tell me ? Is my understanding correct?

I believe so. In redQueue::calcAvg(). Needs fixing.

(The code in this file is very hard to read, not least because the
indentation is all over the shop and statements are cocatenated. Try
following the enque() code...)

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>