From owner-freebsd-net Tue Sep 5 11:50: 1 2000 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 7361137B423; Tue, 5 Sep 2000 11:49:55 -0700 (PDT) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id UAA20917; Tue, 5 Sep 2000 20:51:43 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200009051851.UAA20917@info.iet.unipi.it> Subject: Re: the ifp to a removed pcmcia ethernet card is left in struct ip_moptions and struct ifmultiaddr In-Reply-To: from Robert Watson at "Sep 5, 2000 02:38:54 pm" To: Robert Watson Date: Tue, 5 Sep 2000 20:51:43 +0200 (CEST) Cc: Warner Losh , Wes Peters , Seigo Tanimura , current@FreeBSD.ORG, net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > This is all made harder by the fact that struct mbuf has a struct ifnet > pointer in it, so if for any reason there is an outstanding mbuf ... > This has been raised as an issue before, and is a good reason to ifconfig > down the interface, and wait a second or two before ejecting. You could and still, the wait is not errorproof as delays can be larger than a second or two. I suppose the correct way to do things when you delete an interface is to to keep the struct ifnet around (in some list) for further reuse when the card is reinserted. One could argue that dummynet with its delayed scheduling of packets is screwing up things, but i would argue that having pointers to volatile objects without reference counts is not such a great design, and SMP might give the same kind of problems. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message