what to replace splnet in FreeBSD 5.x?

Ed Maste emaste at phaedrus.sandvine.ca
Tue Jul 12 15:02:27 GMT 2005

On Sat, Jul 09, 2005 at 10:18:19AM -0700, Sam Leffler wrote:
> spl's lock execution threads.  5.x and later systems mostly lock data 
> structures using mtx's (there are a very few exceptions).  Thus there 
> isn't necessarily a direct replacement, you usually need to rethink your 
> locking/synchronization strategy.

This brings up the issue of the remaining splnet()s in 5.x and -CURRENT.
Grepping for "= splnet" in net/ and netinet/ shows more than 50 now
no-op splnet()s left in the stack.

We've run into corruption in the multicast address lists (in_multihead)
on 5.x, and it turns out in_addmulti still has splnet() "protecting" the

I'm not sure how many of the splnet()s are actually false positives
(i.e. no longer relevant, locked in another way, etc.) but they're
probably all good indicators of places that locking still needs to be

Ed Maste, Sandvine Incorporated

More information about the freebsd-net mailing list