From owner-freebsd-current Fri Apr 30 11:24:35 1999 Delivered-To: freebsd-current@freebsd.org Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.40.153]) by hub.freebsd.org (Postfix) with ESMTP id EFE1915029 for ; Fri, 30 Apr 1999 11:24:31 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by phk.freebsd.dk (8.9.1/8.8.8) with ESMTP id UAA10576; Fri, 30 Apr 1999 20:24:29 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.2/8.9.2) with ESMTP id UAA16616; Fri, 30 Apr 1999 20:24:28 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: John Polstra Cc: "Rodney W. Grimes" , freebsd-current@FreeBSD.ORG Subject: Re: Any action on PR 10570 ? getting closer to 65K :-( In-reply-to: Your message of "Fri, 30 Apr 1999 11:20:19 PDT." Date: Fri, 30 Apr 1999 20:24:28 +0200 Message-ID: <16614.925496668@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , John Polstra writes: >Rodney W. Grimes wrote: >>> Pierre Beyssac wrote: >>> >>> > Wouldn't it be sensible to issue a warning (or panic) when >>> > increasing the reference count reaches 0, rather than causing a >>> > later kernel segfault? It would involve some overhead though, and >>> > I'm not sure having 2^32 routes is currently realistic since most >>> > machines don't even have that many bytes of RAM, but it might be >>> > true one day... >>> >>> It would be pretty hard to create 2^32 routes, given that IPv4 only >>> has 32-bit addresses. :-) Also, if you time it I suspect you'll find >>> that it would take a geological lifetime on a fast machine to add that >>> many routes. >> >> But some of us are playing with IPv6 and it is easy to create >2^32 >> routes in that environment. > >You're being totally unrealistic. You can't create >2^32 of >_anything_ on an i386 without running out of memory. Well, John, you can, the newer ones will address 2^36 bytes of memory and even a i386 can address 2^32 bytes or 2^35 bits... But hair splitting aside, you certainly cannot create 2^32 routes without having other significant problems, and while I agree with Rod that the overflow should be checked, I think it should be done with a KASSERT() if not just with a comment. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message