Date: Tue, 31 Jul 2007 18:28:30 -0700 From: Julian Elischer <julian@elischer.org> To: Marko Zec <zec@FreeBSD.org> Cc: Perforce Change Reviews <perforce@FreeBSD.org> Subject: Re: PERFORCE change 124447 for review Message-ID: <46AFE1BE.4030101@elischer.org> In-Reply-To: <200708010104.l7114DvZ032384@repoman.freebsd.org> References: <200708010104.l7114DvZ032384@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46AFE1BE.4030101>