From owner-freebsd-net@FreeBSD.ORG Fri May 28 01:26:50 2004 Return-Path: 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 E19CC16A4CE; Fri, 28 May 2004 01:26:50 -0700 (PDT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 158F443D3F; Fri, 28 May 2004 01:26:50 -0700 (PDT) (envelope-from glebius@cell.sick.ru) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.9/8.12.8) with ESMTP id i4S8PQvw042495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 May 2004 12:25:26 +0400 (MSD) (envelope-from glebius@cell.sick.ru) Received: (from glebius@localhost) by cell.sick.ru (8.12.9/8.12.6/Submit) id i4S8PQpg042494; Fri, 28 May 2004 12:25:26 +0400 (MSD) Date: Fri, 28 May 2004 12:25:25 +0400 From: Gleb Smirnoff To: Julian Elischer Message-ID: <20040528082525.GA42468@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Julian Elischer , Harti Brandt , freebsd-net@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org cc: Harti Brandt Subject: Re: shutdown node VS disconnect all hooks X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 28 May 2004 08:26:51 -0000 On Fri, May 28, 2004 at 01:15:06AM -0700, Julian Elischer wrote: J> > JE>> So, what about adding one more netgraph method into struct ng_type, say J> > JE>> ng_preshutdown_t? This method is called first in ng_rmnode(), and then J> > JE>> current shutdown sequence is followed. We will set it to NULL in all existing J> > JE>> nodes, and create a method in ng_tee, which calls ng_bypass(). Future J> > JE>> implementations may use this method to send "goodbye" messages down hooks when J> > JE>> shutting down. J> > JE> J> > JE>That sounds like a much better solution. Node shutdown is done in 2 J> > JE>parts just as node connection is done in 2 parts. J> > JE> J> > JE>> And this will be a POLA-friendly solution - we will not lose functionality J> > JE>> of RELENG_4 (which mpd relies on), and we will not break nodes which J> > JE>> rely on current shutdown sequence. J> > JE>> J> > JE>> What's your opinion? If it is positive - I'll send patches. J> > JE>> J> > JE> J> > JE>That is a very workable solution. J> > J> > If you do that, I suppose you need to edit all the nodes, right?. In that J> > case could you please convert the initialisation of the typestructs J> > to use C99 sparse initialisation? In that case future changes will be a good J> > deal easier. J> J> actually I don't know if you do need to edit the nodes J> types.. At one time it was true that unassigned elements on J> the end will be NULL. I like idea of sparse initialization. We already have this in ng_hub.c. Julian, if you don't mind, I'll create diff moving all initializations to C99 sparse type. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE