Dependency between interfaces
Wojciech A. Koszek
dunstan at freebsd.czest.pl
Sat Oct 22 03:13:50 PDT 2005
On Thu, Oct 20, 2005 at 01:25:44PM -0700, Brooks Davis 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).
>
> 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.
>
Yes, I know. I just wanted to know is it proper solution. I'll try to fix
it, once I finish updating my patch for locking in ef(4).
Thanks,
--
* Wojciech A. Koszek && dunstan at FreeBSD.czest.pl
More information about the freebsd-net
mailing list