From owner-freebsd-net@FreeBSD.ORG Thu Jan 25 22:00:10 2007 Return-Path: X-Original-To: net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9634216A402; Thu, 25 Jan 2007 22:00:10 +0000 (UTC) (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 03FFA13C455; Thu, 25 Jan 2007 22:00:09 +0000 (UTC) (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 691B049839; Thu, 25 Jan 2007 17:00:08 -0500 (EST) Date: Thu, 25 Jan 2007 22:00:08 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gleb Smirnoff In-Reply-To: <20070125212310.GG7922@cell.sick.ru> Message-ID: <20070125214956.J13293@fledge.watson.org> References: <20070125162422.GA7922@bestcom.ru> <45B8EB23.705@FreeBSD.org> <20070125183720.GB7922@cell.sick.ru> <20070125203807.S13293@fledge.watson.org> <20070125212310.GG7922@cell.sick.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Bruce M. Simpson" , net@FreeBSD.org Subject: Re: rev. 1.94 of netinet/in.c broke CARP 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: Thu, 25 Jan 2007 22:00:11 -0000 On Fri, 26 Jan 2007, Gleb Smirnoff wrote: > On Thu, Jan 25, 2007 at 08:40:52PM +0000, Robert Watson wrote: > R> Architecturally, the right fix is that CARP needs to have a handler for > R> ifnet destruction that always runs before the multicast address garbage > R> collection. I'm pretty preoccupied for the next few days due to an > R> impending paper deadline, so can't investigate further currently, but one > R> way or the other that ordering dependency needs to be expressed. If done > R> properly, CARP will always have released its multicast address before they > R> are forceably removed. Having the reference count is good too, but what I > R> describe should be sufficient regardless of the refcount. > > This means removing usage of EVENTHANDLER(9) and going back to exporting > carp_ifdetach() and calling it directly from if_detach(). This is back out > revision 1.255 of net/if.c. Not sure what is a right way... > > I am worried about that CARP is not the only subsystem in kernel that can > join a multicast group on an ifnet, and keep a pointer to the multicast > instance. Alternatively, we move to having two event handlers: one for general stack consumers to use, and a second one to do low level address and protocol cleanup. CARP would use the former, multicast address stuff the latter... Robert N M Watson Computer Laboratory University of Cambridge