[Click] How to implement variable number of input queues for round robin scheduler?

Ashish Sharma ashishs.sharma at gmail.com
Tue Mar 10 19:22:04 EDT 2009


Hi,

I am interested in a scheme that allows round robin transmission of packets
for each outgoing destination ip. The problem is that the number of
destination hosts cannot be known pre-hand. So is there a way to dynamically
create a new queue for each destination host (thereby queueing all packets
to that host in a separate destination queue), and then link the output to
the round-robin scheduler which now includes this new queue in its schedule?

I am thinking of wrapper queue element that internally maintains a dynamic
set of notifier_queues and for each pull call, dequeues packets from an
internal queue in sequence. But the solution seems a bit messy because of
empty_queue active notifiers management.

Could someone comment on this approach or suggest an alternative one? I am
wondering if this could be done using the Script element, but I am less than
familiar with Script. Any ideas/help would be greatly appreciated.

Thanks
Ashish


More information about the click mailing list