[Click] Strange behavior when using RoundRobinSched, PrioSched

Michael Voorhaen michael.voorhaen at ua.ac.be
Thu Jun 12 07:48:13 EDT 2008


When refactoring a large router we uncovered a problem with some of  
the schedulers in click. The problem is easy to reproduce e.g.

PrioSched -> Discard;

or

RoundRobinSched -> Discard

result in click running at 100% CPU. Since the upstream Discard (or in  
our case unqueue) will never find an upstream empty signal it seems to  
never go to sleep. Off course this is a trivial example and one would  
probably not write it to begin with. On the other hand, we were  
removing the scheduler from the script and a line similar to the one  
above, was mistakenly not removed.

The fix is pretty straightforward as it is sufficient to modify the  
PrioSched or RoundRobinSched to take "1-/1" as the port_count return  
value and not "-/1" as it is now. It seems rather unnecessary to be  
able to define schedulers with no inputs at all.

Regards,
Bart & Michael

-------------------------
IBBT - PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
Campus Middelheim, G3.30
Middelheimlaan 1
B-2020 Antwerpen, Belgium
Phone: +32 (0)3 265.32.91
Fax: +32 (0)3 265.37.77
Web: www.pats.ua.ac.be/michael.voorhaen








More information about the click mailing list