Date: Sat, 1 Jul 2000 09:27:08 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: ache@FreeBSD.ORG (Andrey A. Chernov) Cc: archie@FreeBSD.ORG (Archie Cobbs), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/net if.c if_ethersubr.c if_var.h Message-ID: <200007011627.JAA05559@bubba.whistle.com> In-Reply-To: <20000630130606.A18174@freebsd.org> from "Andrey A. Chernov" at "Jun 30, 2000 01:06:06 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007011627.JAA05559>