From owner-freebsd-current@FreeBSD.ORG Tue Mar 7 10:39:24 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E80E16A420 for ; Tue, 7 Mar 2006 10:39:24 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA31E43D55 for ; Tue, 7 Mar 2006 10:39:23 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 767D446BB3; Tue, 7 Mar 2006 05:39:02 -0500 (EST) Date: Tue, 7 Mar 2006 10:39:33 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Yar Tikhiy In-Reply-To: <20060307102505.GA77106@comp.chem.msu.su> Message-ID: <20060307103522.M30247@fledge.watson.org> References: <60ffc71f0603060759r34f02878ha38a7a275dc0aa6c@mail.gmail.com> <20060306230528.GC61210@comp.chem.msu.su> <60ffc71f0603061531g3c6995d2s54704022fe7ba1f@mail.gmail.com> <20060306235024.GA65709@comp.chem.msu.su> <60ffc71f0603061637j27ebe520r329e88bbc3141746@mail.gmail.com> <20060307012605.C79905@fledge.watson.org> <20060307102505.GA77106@comp.chem.msu.su> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org, Nik Subject: Re: multicast group memberships exceeded in FreeBSD 6-Prerelease X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 10:39:24 -0000 On Tue, 7 Mar 2006, Yar Tikhiy wrote: > On Tue, Mar 07, 2006 at 01:26:28AM +0000, Robert Watson wrote: >> 5B>> On Tue, 7 Mar 2006, Nik wrote: >> >>> Thanks bro. Really appreciate that, I'll give a try after this then I'll >>> let you know the result. >> >> We might want to consider increasing the maximum to a larger number, given >> that 20 does sound a bit small these days. > > I'm afraid that with folks running hundreds of vlan interfaces per host out > there, any reasonable default would be too small to fit every case. When I > faced the problem, I took a quick look at if it would be possible to make it > a sysctl, but it seemed to me not so easy, so I just bumped the define that > time becuase had to make my routers work ASAP. The task of making it a > sysctl may need a re-examination... And given that these are static array lengths, hanging them off every multicast socket seems bad. We probably need to simply support growable arrays of addresses, with an administrative limit that is very high. Now the basic locking for multicast lists on the inpcb is done, this should be possible to do without too much trouble -- we can add an ip_findmoptions() variant that knows that it needs imo_num_memberships + 1 slots, and if there isn't room, perform the array extension and copying the same way it does the basic malloc now. Starting with a default of 20 and then growing in multiples of two isn't a bad approach, which would let us have an administrative limit in the thousands without consuming that much memory all the time. If worried, we could require privilege to exceed a lower administrative limit. I don't have time to work on this now, but once my current socket work is done in a month or so, I can take a look if no one has gotten to it first. Robert N M Watson