cvs commit: src/sys/net if_vlan.c
Julian Elischer
julian at elischer.org
Tue Jul 4 18:47:59 UTC 2006
M. Warner Losh wrote:
>In message: <20060703202803.GA22556 at odin.ac.hmc.edu>
> Brooks Davis <brooks at 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...
>
>
As I mentionned earlier, the mbuf references are not always used. They
are mainly used
for ipfw and friends but are not always used (from memory) on every
packet in the receive path.
In this case it may be as well to have an indirect reference tha can be
checked for validity
each time.. e.g. ifnum. it wouldn't be too much to keep the ifnum slots
around for a period after the
interfaces are destroyed. (and marked invalid), or in tha case of a
hash, failure to find it would suggest
that is is invalid.
>Warner
>
>
More information about the freebsd-net
mailing list