svn commit: r191367 - head/sys/net

Bruce Simpson bms at incunabulum.net
Sun Apr 26 10:32:19 UTC 2009


Robert Watson wrote:
> ...
>>
>> Now that Giant is nuked, the netisr could be eliminated and the ifnet 
>> rlock taken as it is before dispatching an entire chain. I only 
>> implemented a netisr to allow the code to be back-ported, however I 
>> don't care about back-porting any more -- it's too much effort and 
>> the time/funding budget doesn't justify that amount of work.
>
> Have you thought about registering a callback with the 
> ifnet_departure_event event handler to handle interfaces disappearing?

     The igmp_domifdetach() function will already do an IF_DRAIN() for 
the link-scope queue, so registering a departure event handler would 
probably just introduce another point of possible race. ;-)

    Now that Giant has gone away, and the lock recursion in the lower 
half of IP to do with IN_MULTI_LOCK() has been eliminated, it might make 
more sense to ditch the netisr -- I only used it as 7.x was my initial 
target, but of course time grinds on, as does development.

    As of today, the MLDv2 code builds in my p4 branch, and I need to 
rewrite mtest so it can grok IPv6 properly.
    
http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/bms/netdev/sys/netinet6&HIDEDEL=NO

    As things currently stand, I don't plan to back-port the IGMPv3 or 
MLDv2 code to previous FreeBSD versions, but it would make sense to 
leave the netisr in SVN history so that I (or someone else) can do that 
if there's demand for it (probably not, as ABIs get broken, though there 
are ways around that). Once MLDv2 is in SVN, I'd feel better about 
eliminating the use of the netisr entirely in 8.x.

    MLDv1 as implemented in KAME has a little kludge in it to introduce 
jitter on the link-scope 'solicited multicast' group membership reports 
-- this exists mostly to support IPv6's Duplicate Address Detection 
(DAD) mechanism. MLDv2 does not require this jitter -- it's built into 
the MLDv2 protocol already, as state change reports are deferred to give 
the local node a chance to merge them, and these ones only get seen when 
IPv6 is initially attached to an ifnet.

BTW: Thanks so much for tackling the ifdead stuff, this is a big help 
towards streamlining against possible races such as the ones Sam saw 
with the 802.11 VAP code right after SSM went in. Also, thanks for 
catching the use-after-free in mainline, I have now patched this in the 
MLDv2 fork.

cheers,
BMS



More information about the svn-src-head mailing list