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

Re: Token Bucket Filter



Bodog Gyula wrote:
> 
> Dear all,
> 
> I used token bucket filter to my simulation. I'd lie to simulate some
> scheduling algorithm which is implemented in NS. I used CBR sources which are
> leaky bucket constrained.
> 
> During the simulation I have a big problem. There are 7 session (7 CBR
> sources). Each can send packets from the begining of the simulation.
> But when used tbf, some sources doen't send any packet. However it should send
> packets with a specified rate.
> 
> Has somybody know what could be the problem?
> 
> Thanks ind advance,
> 
>  * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>  *    Gyula Bodog                                      *
>  *     e-mail: [email protected]              *
>  *     tel.: (06 1) 3-691-839                          *
>  *     Student at Technical University of Budapest     *
>  *                                                     *
>  * * * * * * * * * * * * * * * * * * * * * * * * * * * *

A recently sent message mentionned this:

	Hi,

	We believe to have just found a bug in tbf.cc. Function TBF::recv has a
	static variable "init", which gives wrong results when there is more
	than one TBF object. We moved the "init" variable to the class
	declaration in tbf.h as a protected variable, so that it can now work
	fine with multiple TBF objects.

	Lidia Yamamoto
	Ludovic Kuty

The problem is: The first tbf starts with a full bucket and others tbfs start
with an empty bucket though they should also start with a full bucket.


Change the tbf code that way and it may resolve your problem.

Ludovic Kuty