From owner-freebsd-net@FreeBSD.ORG  Fri May 28 00:29:45 2004
Return-Path: <owner-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 A029316A4D8
	for <freebsd-net@freebsd.org>; Fri, 28 May 2004 00:29:45 -0700 (PDT)
Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com
	[129.247.16.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 77A4E43D5D
	for <freebsd-net@freebsd.org>; Fri, 28 May 2004 00:29:44 -0700 (PDT)
	(envelope-from harti@freebsd.org)
Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1])
	i4S7Ssj57354;	Fri, 28 May 2004 09:28:55 +0200
Received: from zeus (zeus.nt.op.dlr.de [129.247.173.3]) by n81.sp.op.dlr.de
	(AIX5.1/8.11.6p2/8.11.0) with ESMTP id i4S7SiK171840; Fri, 28 May 2004
	09:28:44 +0200
Date: Fri, 28 May 2004 09:28:43 +0200 (MET DST)
From: Harti Brandt <harti@freebsd.org>
X-X-Sender: brandt@zeus
To: Gleb Smirnoff <glebius@cell.sick.ru>
In-Reply-To: <Pine.BSF.4.21.0405271628360.69401-100000@InterJet.elischer.org>
Message-ID: <Pine.GSO.4.60.0405280925170.18426@zeus>
References: <Pine.BSF.4.21.0405271628360.69401-100000@InterJet.elischer.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: freebsd-net@freebsd.org
cc: Julian Elischer <julian@elischer.org>
Subject: Re: shutdown node VS disconnect all hooks
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Harti Brandt <harti@freebsd.org>
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 28 May 2004 07:29:45 -0000


[Sorry, I just deleted the original mail, so I use Julian's to answer]

On Thu, 27 May 2004, Julian Elischer wrote:

JE>On Fri, 28 May 2004, Gleb Smirnoff wrote:
JE>
JE>>   So, what about adding one more netgraph method into struct ng_type, say
JE>> ng_preshutdown_t? This method is called first in ng_rmnode(), and then 
JE>> current shutdown sequence is followed. We will set it to NULL in all existing
JE>> nodes, and create a method in ng_tee, which calls ng_bypass(). Future
JE>> implementations may use this method to send "goodbye" messages down hooks when
JE>> shutting down.
JE>
JE>That sounds like a much better solution. Node shutdown is done in 2
JE>parts just as node connection is done in 2 parts.
JE>
JE>>   And this will be a POLA-friendly solution - we will not lose functionality
JE>> of RELENG_4 (which mpd relies on), and we will not break nodes which
JE>> rely on current shutdown sequence.
JE>> 
JE>>   What's your opinion? If it is positive - I'll send patches.
JE>> 
JE>
JE>That is a very workable solution.

If you do that, I suppose you need to edit all the nodes, right?. In that
case could you please convert the initialisation of the typestructs
to use C99 sparse initialisation? In that case future changes will be a good
deal easier.

harti