Re: [LIP] Re: Re: IP module xmitting packets (Amit Kucheria)

Amit Kucheria <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
On Wed, 14 Jan 2004, suresh kumar wrote:

> As u said "routing cache is used for exactly what its name signifies:
> routing.", I don't find any reason of maintaining an entry for each
> connection in the routing cache, and xmitting packets based on the
> entries and not on the fib could be more costly as no. of entries in
> the fib will be much less than that of in routing cache. If u find any
> reason pls. post it. Either I am missing some thing critical or I got
> to dig in some more.

Consider an outgoing packet with a destination address 'A'. In order to
successfully xmit this packet, the network stack needs to figure out the
outgoing interface and nexthop. Instead of querying the FIB for each
outgoing packet (which is an expensive operation, searching through
linked list), the hash of src, dest and TOS is maintained (one-time
inexpensive operation) and this hash acts as an index into the routing
cache (hashtable). This way there is no query involved.

Translate this to a box that xmits thousands of packets a second, and 
you start to see tremendous performance gains.

This depends on the statistical clumping of packets. A new connection is 
not expected to just send one packet. If you created an application that 
sent a *single* packet to thousands of destinations in order, then the 
route cache would be useless, infact impacting performance.

/A

-- 
I'm an angel!!! Honest!
The horns are just there to hold the halo up straight.
-----------------------------------------------------
Amit Kucheria             | amitk@ NOSPAM ittc.ku.edu
Wireless Systems Engineer | 760-822-8529
Metric Systems Corp.      | Vista, CA 92083
-----------------------------------------------------



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.