[net2-wg] routing protocols on ..

Philip Levis pal at cs.stanford.edu
Wed Jan 18 21:56:47 PST 2006


On Jan 18, 2006, at 12:50 PM, Philip Levis wrote:

> The T2 WG agreed today with the net2 WG recommendations of fair
> queueing, etc. I should  be committing the components today. The
> document to look at is TEP 116: Packet Protocols.

I wasn't able to finish the components today. There were a few corner  
cases on the queue I wanted to handle properly (e.g., not suffering a  
task latency when sending on an empty queue and signaling sendDone  
*after* submitting the next send). All of that aside, you can code  
against the components and interfaces specified in TEP 116. I'll  
definitely check them in tomorrow (I think I have ~1 hour of coding  
left, + ~1 hour debugging).

The current implementation uses a round-robin queue. Basically, it  
cycles through the possible queue entries until it finds a pending  
packet, starting with the index of the last packet sent. This is also  
fair queueing (there's one packet per entry), but does not preserve a  
FIFO ordering. The advantage is that it saves n+1 bytes of RAM, where  
n is the number of clients. Even for 20 clients, cycling through the  
array shouldn't much more than 240 cycles, which is less than 0.1% of  
a packet time.

I'll look into a fcfs implementation once I check in the RRobin.

Phil

-------

"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."

- T. S. Eliot,  'Little Gidding'





More information about the net2-wg mailing list