From owner-freebsd-net@FreeBSD.ORG Fri May 12 13:12:32 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2753E16A400; Fri, 12 May 2006 13:12:32 +0000 (UTC) (envelope-from bms@spc.org) Received: from mindfull.spc.org (mindfull.spc.org [83.167.185.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 723B243D45; Fri, 12 May 2006 13:12:31 +0000 (GMT) (envelope-from bms@spc.org) Received: from arginine.spc.org ([83.167.185.2]) by mindfull.spc.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52) id 1FeXRS-0004je-Hr; Fri, 12 May 2006 14:12:26 +0100 Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id BFCEB65499; Fri, 12 May 2006 14:12:28 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 95131-01-2; Fri, 12 May 2006 14:12:27 +0100 (BST) Received: by arginine.spc.org (Postfix, from userid 1078) id B287E653F9; Fri, 12 May 2006 14:12:27 +0100 (BST) Date: Fri, 12 May 2006 14:12:27 +0100 From: Bruce M Simpson To: Stephen Clark Message-ID: <20060512131227.GD79277@spc.org> Mail-Followup-To: Bruce M Simpson , Stephen Clark , Robert Watson , freebsd-net@freebsd.org, pavlin@icir.org, atanu@icir.org References: <20060509122801.GA65297@spc.org> <20060509131517.GB79277@spc.org> <20060512030152.X20138@fledge.watson.org> <4463FD1D.9010600@seclark.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4463FD1D.9010600@seclark.us> User-Agent: Mutt/1.4.1i Organization: Incunabulum X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - mindfull.spc.org X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - spc.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-net@freebsd.org, Robert Watson , pavlin@icir.org, atanu@icir.org Subject: Re: IP_MAX_MEMBERSHIPS story. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 13:12:32 -0000 On Thu, May 11, 2006 at 11:12:29PM -0400, Stephen Clark wrote: > >I'm loosely of the opinion that the membership array should be > >variable length, and that we should default it to 20, but have a > >significantly larger maximum. It's not horribly efficient, but also > >wouldn't be so particularly terrible either. > > I think it should be tunable other than going in a changing the source > code, which I have to do every time I do a cvsup. This is the express intention of such a change. The problem the user(s) are having is because each imo_membership member's cardinality of relationship is 1:1 with respect to each multicast group membership and each ifnet interface upon which the membership is established. Therefore, joining the same group 20 times on different interfaces would exceed IP_MAX_MEMBERSHIPS. Fixing this in any way would still break the ip_mroute_kmod ABI and as such is a HEAD change. Based on Robert's feedback I would therefore make a change such that imo_membership is dynamically sized at runtime, rather than making IP_MAX_MEMBERSHIPS a load-time tunable. Based on reading of the code it looks like it may be best that imo_moptions becomes a pointer, not an array. I am happier with this kind of change because it is less invasive to other parts of netinet, and also because it fits in with the lazy allocation which already exists viz ip_findmoptions(). It is also much simpler -- the complexity belongs in ip_findmoptions() and ip_freemoptions(). Further feedback hoped for. I will post patches soon. Regards, BMS