From owner-freebsd-arch Tue Dec 14 14: 6:51 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id ADA7E14A03 for ; Tue, 14 Dec 1999 14:06:48 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id XAA09103 for ; Tue, 14 Dec 1999 23:06:46 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id XAA66270 for freebsd-arch@freebsd.org; Tue, 14 Dec 1999 23:06:46 +0100 (MET) Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id 9BA6215409 for ; Tue, 14 Dec 1999 14:05:00 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id QAA22839; Tue, 14 Dec 1999 16:04:55 -0600 (CST) Received: (from jlemon@localhost) by right.PCS (8.8.5/8.6.4) id QAA25190; Tue, 14 Dec 1999 16:04:54 -0600 (CST) Message-ID: <19991214160454.26093@right.PCS> Date: Tue, 14 Dec 1999 16:04:54 -0600 From: Jonathan Lemon To: Brian Somers Cc: Warner Losh , freebsd-arch@freebsd.org, brian@hak.lan.Awfulhak.org Subject: Re: The if_detach problem References: <199912142145.VAA34161@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199912142145.VAA34161@hak.lan.Awfulhak.org>; from Brian Somers on Dec 12, 1999 at 09:45:36PM +0000 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Dec 12, 1999 at 09:45:36PM +0000, Brian Somers wrote: > > > > if_detach doesn't, at least not completely. > > > > That's a problem when you want to remove interfaces. One problem is > > that the routing system caches ifaddr and other things. There is a > > mechanism in place that could be used to clean things up. > > > > In the protosw there is a ctlinput routine which accepts various > > commands. One way to deal with this is to send a new command when ifa > > goes away. Right now when we do if_down we send a PRC_IFDOWN. Maybe > > we need to invent a new PRC_, say PRC_IFDETACH. Then we wouldn't need > > the kludges in if_detach. The ctlinput routines could then, in the > > appropriate places, scrub the references to the interface that just > > went away. > > > > I'd like to go down this path, any comments? > > Not comments, but my thoughts.... > > Is there a lot to be gained by removing interfaces ? Loadable device drivers. I ran into this last week or so when unloading a driver I'm developing; if I don't do an 'ifconfig xxx delete' before the kldunoad, I get a panic. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message