From owner-cvs-all Sat Dec 8 11:18:14 2001 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id A3B1637B416; Sat, 8 Dec 2001 11:18:09 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fB8JI9A06195; Sat, 8 Dec 2001 11:18:09 -0800 (PST) (envelope-from dillon) Date: Sat, 8 Dec 2001 11:18:09 -0800 (PST) From: Matthew Dillon Message-Id: <200112081918.fB8JI9A06195@apollo.backplane.com> To: Ruslan Ermilov Cc: "Andrew R. Reiter" , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/netinet icmp_var.h ip_icmp.c ip_input.c ip_mroute.c ip_output.c ip_var.h src/usr.bin/netstat inet.c References: <200112070923.fB79NFg12719@freefall.freebsd.org> <20011208161111.C32556@sunbay.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> : - Make ip_rtaddr() global, and use it to look up the correct source :> : address in icmp_reflect(). :> : - Two new "struct icmpstat" members: icps_badaddr and icps_noroute. :> : - Allow for ip_output() to be called with a NULL route pointer. :> :> I thought it was brought up at the -current commit time that being allowed :> to pass a NULL route pointer to ip_output() was a solution, but not the :> most ideal... Am I incorrect? :> :Yes, it was brought up, and I've replied. My last posting on the subject :left unanswered (well, sorta): : :http://www.FreeBSD.org/cgi/mid.cgi?id=20011204103455.B26925@sunbay.com : : :Cheers, :-- :Ruslan Ermilov Oracle Developer/DBA, Maybe a better solution would be to integrate route caching with ip_output(). Instead of passing a 'struct route *ro' to ip_output() you instead pass a 'struct route **pro' to ip_output. If pro is NULL ip_output() will look up the route, use it, and then dereference it. If *pro is NULL ip_output() will look up the route, use it, and also store it (with a ref) in *pro. If *pro is not NULL ip_output() will determine if the cached route is valid and use it if so, or replace (deref / lookup / store+ref) it if it is not valid. I dunno, I'm just throwing out ideas. It wouldn't get rid of all the route lookups since the various stacks usually need to figure out the outgoing interface mtu long before they get to ip_output(). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message