From owner-freebsd-net@FreeBSD.ORG Thu Oct 20 20:25:49 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 717D216A41F for ; Thu, 20 Oct 2005 20:25:49 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF51343D62 for ; Thu, 20 Oct 2005 20:25:48 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j9KKPi2U007225; Thu, 20 Oct 2005 13:25:44 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j9KKPiMu007224; Thu, 20 Oct 2005 13:25:44 -0700 Date: Thu, 20 Oct 2005 13:25:44 -0700 From: Brooks Davis To: "Wojciech A. Koszek" Message-ID: <20051020202544.GC18840@odin.ac.hmc.edu> References: <20051020202034.GA4556@freebsd.czest.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline In-Reply-To: <20051020202034.GA4556@freebsd.czest.pl> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-net@freebsd.org Subject: Re: Dependency between interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 20:25:49 -0000 --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2005 at 08:20:34PM +0000, Wojciech A. Koszek wrote: > Hello, >=20 > 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 kn= ow > about it and continues it's operation. >=20 > 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 th= ink > 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 --=20 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 --bCsyhTFzCvuiizWE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDV/1HXY6L6fI4GtQRAqBRAJ0d7fIenxmhkt+nb2QdmmZGYUksywCfYXTr P6CHtRxQAtLL/QxHlh1Zlbg= =F1cf -----END PGP SIGNATURE----- --bCsyhTFzCvuiizWE--