Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jul 2006 17:36:43 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        yar@comp.chem.msu.su, src-committers@freebsd.org, julian@elischer.org, freebsd-net@freebsd.org
Subject:   Re: cvs commit: src/sys/net if_vlan.c
Message-ID:  <20060704173115.V44010@fledge.watson.org>
In-Reply-To: <20060704.102539.-494099438.imp@bsdimp.com>
References:  <44A40C25.904@elischer.org> <20060630115749.G3964@fledge.watson.org> <20060703202803.GA22556@odin.ac.hmc.edu> <20060704.102539.-494099438.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 4 Jul 2006, M. Warner Losh wrote:

> In message: <20060703202803.GA22556@odin.ac.hmc.edu>
>            Brooks Davis <brooks@one-eyed-alien.net> writes:
> : and act as though the interface is not there.  We could then consider
> : either holding the interface for a configurable or computed length
> : of time or adding some sort of refcounting (probably impractical).
>
> Refcounting would be good for the 'macro' things (coming and going) that are 
> infrequent, but we might have mulitple people doing.  You are right it 
> likely is too inefficient to do with mbugs.  One other option might be to 
> have a configurable time after the last time that it was accessed via the 
> 'safe' routines that were setup.  This way we'd tie the removal of the 
> interface to a period of time after it was last used, rather than after it 
> was removed.  I don't know if such a difference would matter much in 
> practice.
>
> The only other 'issue' that I see with this approach is if I remove a card, 
> and then insert it again before the timeout happens.  Does that card get a 
> new interface name?  And would people care or not...

I think that the name should cease to be "reserved" as soon as the device 
driver has destroyed the ifnet, because it is up to the device driver to 
select the index, not the ifnet framework.  This means keeping the structure 
semi-valid but in a state that limits further bad behavior (i.e., repointing 
its function points at stubs, etc), but removing references to it in global 
data structures, etc.  We're not just quiescing, we're actually taking it 99% 
of the way to turn down.

Robert N M Watson
Computer Laboratory
University of Cambridge



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