Query wrt Router Table behaviour

From: Jonathan Day (jd9812@my-Deja.com)
Date: Sun Aug 13 2000 - 14:53:26 EST


Hi,
   I've noticed that Linux' router table code
has always allowed duplicate entries. (Same
source, same destination, same device, same
gateway, etc.)
   As the duplicates are redundant and just hog
router table space, is this "correct" behaviour?
(I remember hearing some time back the argument
that O'(O(t))=t, where O is the operation on the
table, O' is the inverse, and t is the table. At
first sight, this is logical, but it assumes
that the router table is a collection of items
which may or may not be unique. However, in
terms of how the computer behaves, the table is
a set of items which -must- be unique.)
   Yes, I know that the table is being held in a
linked list, which makes searches inefficient,
but that always leaves two options:
   Option 1: have a garbage-collection routine
periodicly clense the router table of junk.
   Option 2: Store the table in a tree (for
the destination), and a list within that. This
would make for quicker searches (though given
the list is usually small, probably not
significantly), and easier checks for duplicates
at insertion time.
   Having said all that, none of this is exactly
obscure or arcane. I can therefore conclude that
there are some excellent reasons I'm missing for
the Linux networking code to work the way it
does.
   If anyone wants to enlighten me, please feel
free!

--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:31 EST