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