From owner-cvs-all Tue Aug 13 1:53:52 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50B4D37B400; Tue, 13 Aug 2002 01:53:37 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id E83FE43E6E; Tue, 13 Aug 2002 01:53:00 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g7D8pM858111; Tue, 13 Aug 2002 11:51:22 +0300 (EEST) (envelope-from ru) Date: Tue, 13 Aug 2002 11:51:22 +0300 From: Ruslan Ermilov To: Luigi Rizzo Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/netinet in_rmx.c ip_input.c ip_var.h Message-ID: <20020813085122.GC54451@sunbay.com> References: <200208091449.g79EnNRh005472@freefall.freebsd.org> <20020809080953.B62786@iguana.icir.org> <20020811105249.GB11677@sunbay.com> <20020811054337.B84502@iguana.icir.org> <20020812123953.GB41233@sunbay.com> <20020812145105.B148@iguana.icir.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <20020812145105.B148@iguana.icir.org> User-Agent: Mutt/1.3.99i 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 --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 12, 2002 at 02:51:05PM -0700, Luigi Rizzo wrote: > On Mon, Aug 12, 2002 at 03:39:53PM +0300, Ruslan Ermilov wrote: > ... > > Hmm, I think ipflow is subject to the same problem. If you had > > the 10/8 route, and forwarded some packets to 10.0.0.1, ipflow > > caches this (network) route. If you then add the host route to > > 10.0.0.1, nothing in the ipflow code (at least I don't see it) > > updates the ipflow's idea of the "best match route", and ipflow > > continues to use the old 10/8 route. Am I mistaken? >=20 > so, I have a question here... i believe TCP sockets cache a > host route to the destination (say 10.0.0.1 in your example), > possibly cloning one from a more generic one (e.g. 10/8). > Now how does the invalidation works if someone adds say > a different 10.0.0/24 route ? The 10/8 is still alive... >=20 Yes, this is a known bug, and that is why PR kern/10778 is still open. The idea was to add the timestamping facility to the routing table and for the cache entries. Whenever a new route is added to the routing table, the routing table's timestamp would get updated, and all cache entries that were cached earlier would then be pruned on the first access. I then gave up on this idea since I had a somewhat better one: when a new route is added to the routing table, mark all less-specific entries with refcnt > 0 as "potentially outdate", and perform the lazy pruning of cache entries as before. What you proposed (to use ipflow hash for IP forwarding) would just re-introduce this bug there. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9WMiKUkv4P6juNwoRAvDjAJ97SEnG4cFU3S7YUYi4EdS/QCckjgCeKPEh SmEwmV+wJJkeNenAe8QuX0E= =HvXw -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message