From owner-p4-projects@FreeBSD.ORG Wed Aug 1 01:27:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 27B2016A41A; Wed, 1 Aug 2007 01:27:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C030116A421 for ; Wed, 1 Aug 2007 01:27:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outU.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id AF54313C480 for ; Wed, 1 Aug 2007 01:27:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 31 Jul 2007 18:27:55 -0700 Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 8616A125ADA; Tue, 31 Jul 2007 18:27:55 -0700 (PDT) Message-ID: <46AFE1BE.4030101@elischer.org> Date: Tue, 31 Jul 2007 18:28:30 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Marko Zec References: <200708010104.l7114DvZ032384@repoman.freebsd.org> In-Reply-To: <200708010104.l7114DvZ032384@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124447 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 01:27:57 -0000 Marko Zec wrote: there is a "really die" flag that should be used if a node may be associated with hardware, or for some other reason be persistent. /* Ask the type if it has anything to do in this case */ if (node->nd_type && node->nd_type->shutdown) { (*node->nd_type->shutdown)(node); if (NG_NODE_IS_VALID(node)) { /* * Well, blow me down if the node code hasn't declared * that it doesn't want to die. * Presumably it is a persistent node. * If we REALLY want it to go away, * e.g. hardware going away, * Our caller should set NGF_REALLY_DIE in nd_flags. */ node->nd_flags &= ~(NGF_INVALID|NGF_CLOSING); NG_NODE_UNREF(node); /* Assume they still have theirs */ return; } } else { /* do the default thing */ NG_NODE_UNREF(node); } > > +#ifdef VIMAGE > +static int vnet_netgraph_idetach(const void *unused) > +{ > + INIT_VNET_NETGRAPH(curvnet); > + node_p node, last_killed = NULL; > + > + while ((node = LIST_FIRST(&V_ng_nodelist)) != NULL) { > + if (node == last_killed) > + panic("netgraph node %s won't die", node->nd_name); > + ng_rmnode(node, NULL, NULL, 0); > + last_killed = node; > + } > + > + return 0; > +} > +#endif > + > static moduledata_t netgraph_mod = { > "netgraph", > ngb_mod_event,