Schedule granularity

Benjie Chen benjie at amsterdam.lcs.mit.edu
Tue Jul 3 12:32:57 EDT 2001


in the latest click release there are two elements that could be
useful for you. they are DelayShaper and DelayUnqueue.

both elements can be used to simulate latency across a wire.
they emit a packet only if the packet has been delayed for a 
specified amount of time. right now they both take ms arguments,
but you should be able to change them to be us arguments easily.

you must use them with the SetTimestamp element, which sets the
timestamp annotation of the packet. you should set the timestamp
when the packet comes into the configuration. SetTimestamp uses
gettimeofday for timestamp. gettimeofday uses the timestamp/cycle
counter on the chip to get the time, so i believe everytime you
call it you will get a different value. check arch/i386/kernel/time.c
for detail...

hope this is what you needed...


On Tue, Jul 03, 2001 at 05:15:52PM +0200, Brecht Vermeulen wrote:
> 
> Dear Click'ers,
> 
> Has anyone a fine idea about the time granularity which can be used in a
> Click element ?
> 
> The issue is that other people in the project ask to simulate a network
> between 2 routers (which will be click routers) with a.o. delay.
> 
> So, it is possible to develop a delay Click element, but what timing
> resolution can be used, or how can we e.g. make the packet delay a
> certain time (I don't know very much about the Linux kernel) ?
> 
> I know normally the kernel has a scheduling granularity of 10 ms (100
> Hz). Is click also dependent of this or how do you schedule the
> different elements ?
> 
> thanks for any help,
> Brecht

-- 
benjie chen
benjie at lcs.mit.edu



More information about the click mailing list