Date: Thu, 20 Oct 2005 13:25:44 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> Cc: freebsd-net@freebsd.org Subject: Re: Dependency between interfaces Message-ID: <20051020202544.GC18840@odin.ac.hmc.edu> In-Reply-To: <20051020202034.GA4556@freebsd.czest.pl> References: <20051020202034.GA4556@freebsd.czest.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Thu, Oct 20, 2005 at 08:20:34PM +0000, Wojciech A. Koszek wrote: > Hello, > > Is EVENTHANDLER(9) proper way of notification for standalone driver about > network interface attach/detach operations? I've met simple problem in > ef(4), which causes machine freeze in following situation: load NIC driver > -> load if_ef -> unload NIC driver -> some activity with interface. > Althought driver of network interface no longer exists, if_ef does not know > about it and continues it's operation. > > I've seen similar situation for example in ng_fec(4): piece of code needs to > call some cleanup routines in order to keep pointers in valid state. I think > this situation is almost the same like this current in if_bridge(4). Just > repeat situation described above for ef(4), but with if_bridge(4). It looks like you could hook into the ifnet_departure_event pretty easily. The one gotcha is that it's called during interface renames so you need to consider that possibility. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDV/1HXY6L6fI4GtQRAqBRAJ0d7fIenxmhkt+nb2QdmmZGYUksywCfYXTr P6CHtRxQAtLL/QxHlh1Zlbg= =F1cf -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051020202544.GC18840>
