From owner-p4-projects@FreeBSD.ORG Wed Aug 1 12:07:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DA5616A420; Wed, 1 Aug 2007 12:07:14 +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 2858116A41B; Wed, 1 Aug 2007 12:07:14 +0000 (UTC) (envelope-from zec@icir.org) Received: from mail.srv.carnet.hr (unknown [IPv6:2001:b68:e160:0:211:43ff:fecd:6374]) by mx1.freebsd.org (Postfix) with ESMTP id 12D4513C4CA; Wed, 1 Aug 2007 12:07:13 +0000 (UTC) (envelope-from zec@icir.org) Received: from vipnet86-165.mobile.carnet.hr ([193.198.165.86]:51696) by mail.srv.carnet.hr with esmtp (Exim 4.50) id 1IGCyq-0001oJ-4F; Wed, 01 Aug 2007 14:07:09 +0200 From: Marko Zec To: Julian Elischer Date: Wed, 1 Aug 2007 14:06:57 +0200 User-Agent: KMail/1.9.4 References: <200708010104.l7114DvZ032384@repoman.freebsd.org> <46AFE1BE.4030101@elischer.org> In-Reply-To: <46AFE1BE.4030101@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708011406.58174.zec@icir.org> X-SA-Exim-Connect-IP: 193.198.165.86 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on nihal.carnet.hr X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.1.4 X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) Cc: Perforce Change Reviews , Marko Zec 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 12:07:14 -0000 On Wednesday 01 August 2007 03:28, Julian Elischer 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. Thanks for the tip -> NGF_REALLY_DIE is now in //depot/projects/vimage/src/sys/netgraph/ng_base.c#14 Marko > /* 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,