Subject: Re: Problems with outgoing routing of UDP packets
To: Greg Troxel <gdt@ir.bbn.com>
From: Tom Ivar Helbekkmo <tih@eunetnorge.no>
List: tech-net
Date: 04/22/2004 18:54:22
Greg Troxel <gdt@ir.bbn.com> writes:

> I'd argue that a route caching should have the property that the
> cached route, whenever used, is the same route that would be found
> from a fresh lookup.  This is a pretty strong requirement, and I do
> not believe that the current code does this.

I've been thinking about this one, and have an idea for a scheme that
could work.  If I understand correctly, the routing table is actually
a tree structure, and the caching is to avoid traversing this every
time a packet is to be sent.  What if each entry in the routing tree
were expanded to include an associated serial number, say a copy of a
shared 32 bit value that was incremented every time any routing table
entry was updated, and the cached copy was implemented as a pointer
to the real entry, *and* a copy of the correct sequence number of that
entry.  Thus, if the pointed-to sequence number agrees with that in
the cache, use the pointed-to entry, else traverse the routing table
anew, finding the proper entry to use now.  On every routing table
update, all affected nodes in the tree would need to be assigned new
sequence numbers.

-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway
www.eunet.no  T: +47-22092958 M: +47-93013940 F: +47-22092901