tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MP-safe ifnet with psz & psref
Date: Thu, 19 May 2016 16:11:56 +0900
From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
I'm working on a next task that replaces an ifnet pointer embedded
in other objects, say mbuf and rtentry, with an interface index
(ifnet#if_index) and when we take an ifnet object from such objects,
look it up (with psz or psref) from the interface collection
(ifindex2ifnet, just an array). By doing so, we can ensure a taken
ifnet object isn't freed during manipulating it. And if an interface
which we're obtaining is being destroyed, a look-up just returns NULL.
Can you explain why there are long-term mbufs and rtentries that may
continue to point to ifnets that are gone? Can you instead arrange to
(1) prevent an ifnet from being used, and (2) flush all mbufs and
rtentries pointing at it, before (3) destroying the ifnet?
Home |
Main Index |
Thread Index |
Old Index