Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2005 10:34:05 +0000
From:      "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
To:        Andrew Thompson <thompsa@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Dependency between interfaces
Message-ID:  <20051022103404.GA26148@freebsd.czest.pl>
In-Reply-To: <20051020202327.GA53753@heff.fud.org.nz>
References:  <20051020202034.GA4556@freebsd.czest.pl> <20051020202327.GA53753@heff.fud.org.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 21, 2005 at 09:23:27AM +1300, Andrew Thompson wrote:
> 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).
> > 
> 
> if_bridge(4) now hooks into ether_detach to get notified of a vanishing
> interface, as of r1.26 (and now in RELENG_6*)
> 
>   Use bridge_ifdetach() to notify the bridge that a member has been
>   detached.  The bridge can then remove it from its interface list and
>   not try to send out via a dead pointer.
> 
> Is it still a problem or did you test on a pre r1.26 kernel?
> 

Thanks, it seems to work just fine. I've tested it with earlier versions.
I'll probably have to play with EVENTHANDLER to fix ef(4).

-- 
* Wojciech A. Koszek && dunstan@FreeBSD.czest.pl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051022103404.GA26148>