From owner-cvs-all Sat Jul 1 9:27:12 2000 Delivered-To: cvs-all@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id E6C0037B718; Sat, 1 Jul 2000 09:27:08 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id JAA05559; Sat, 1 Jul 2000 09:27:08 -0700 (PDT) From: Archie Cobbs Message-Id: <200007011627.JAA05559@bubba.whistle.com> Subject: Re: cvs commit: src/sys/net if.c if_ethersubr.c if_var.h In-Reply-To: <20000630130606.A18174@freebsd.org> from "Andrey A. Chernov" at "Jun 30, 2000 01:06:06 pm" To: ache@FreeBSD.ORG (Andrey A. Chernov) Date: Sat, 1 Jul 2000 09:27:08 -0700 (PDT) Cc: archie@FreeBSD.ORG (Archie Cobbs), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrey A. Chernov writes: > On Fri, Jun 30, 2000 at 06:00:54AM -0700, Andrey A. Chernov wrote: > > if.o: In function `if_detach': > > if.o(.text+0x314): undefined reference to `ng_ether_detach_p' > > I see you just remove ng_ether_detach_p code from if.c v1.90, well it compiles > now without "device ether', but I not see any place where ng_ether_detach_p() > function is called, just declared. If it is never called, why you keep it? I'm going to fix that later. Right now you'll get a panic if you eject a PCCARD ethernet that was doing netgraph, unfortunately. The problem is that the interfaces are not very object oriented (with respect to type), combined with the dynamically loadable code. As an example of the former, all ethernet drivers call if_attach() and ether_attach() when connecting, but only if_detach() when disconnecting. Perhaps they should all only call ether_attach() and ether_detach(). The simplest 'correct' solution I can think of is to have a linker set into which each interface type could link if it wanted to have a special if_detach() callout.. and then put ethernet in there, so it can call (*ng_ether_detach_p)() when an ethernet interface is detached. Got any better ideas? Anyway, I'm on vacationthis next week so probably won't get around to fixing this until after then.. unless someone else wants to take a stab. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message