Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Mar 1997 12:27:13 -0500
From:      dennis <dennis@etinc.com>
To:        dg@root.com, Julian Assange <proff@iq.org>
Cc:        hackers@freebsd.org
Subject:   Re: optimised ip_input 
Message-ID:  <3.0.32.19970301122709.00b1f390@etinc.com>

next in thread | raw e-mail | index | archive | help
At 08:21 AM 3/1/97 -0800, you wrote:
>>ip_input() is appalling slow for multi-homed hosts, taking around
>>2 x num_interface_addresses comparisons to detect if a packet is
>>locally destined.
>>
>>I've addressed this with address caching, hashing, and intelligent
>>handling of broadcast addresses. Interested?
>
>   Certainly...I'd like to see the diffs...

A better way of handing the overhead and the complexity  issue is to
keep local addresses in the routing table with a LOCAL flag. This 
eliminates the overhead altogether and simplifies the process:

route=routelookup()
if (route.flags & localflag)
	deal_withit_locally()
else
	forward()

You can argue that in some cases this is more overhead for locally
destined packets, but in todays world (where routing speed is a
primary concern) this is faster most of the time and makes life
easier as it centralizes the structure dependencies.

Just a thought.

Dennis
>
>-DG
>
>David Greenman
>Core-team/Principal Architect, The FreeBSD Project
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19970301122709.00b1f390>