tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fast v.s classic forwarding in NetBSD 4.0



On Fri, Jul 09, 2010 at 01:15:58PM +0200, Putrycy wrote:
> Im having problems understanding relation between "classic"
> (ip_input.c) and fast (ip_flow.c) forwarding. Could
> anyone please explain what exactly is the difference, which mechanism
> is used when, and what is corelation between those two ?

ip_input.c does a full routing table look up for every packet. It has a
single entry cache for the most recently used route, but that is
normally not very efficient.

ip_flow.c does flow-table based routing. It does a lookup for the packet
header in an rb-tree and if it finds an entry, it uses the cached route.

The primary difference between fast forwarding and normal forwarding is
that the former traverses a bit less of the network stack and is quite a
bit more efficient if there is a reasonable small to medium set of
active connections AND the number of routes is high. I doubt it makes a
different for a home router.

Joerg


Home | Main Index | Thread Index | Old Index