From owner-freebsd-hackers Sat Mar 1 09:28:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA20106 for hackers-outgoing; Sat, 1 Mar 1997 09:28:14 -0800 (PST) Received: from etinc.com (et-gw-fr1.etinc.com [204.141.244.98]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA20087 for ; Sat, 1 Mar 1997 09:28:07 -0800 (PST) Received: from ntws (ntws.etinc.com [204.141.95.142]) by etinc.com (8.8.3/8.6.9) with SMTP id MAA25024; Sat, 1 Mar 1997 12:35:29 -0500 (EST) Message-Id: <3.0.32.19970301122709.00b1f390@etinc.com> X-Sender: dennis@etinc.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Sat, 01 Mar 1997 12:27:13 -0500 To: dg@root.com, Julian Assange From: dennis Subject: Re: optimised ip_input Cc: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 > >