cvs commit: src/sys/sys protosw.h src/sys/kern uipc_domain.cuipc_socket2.c

Robert Watson rwatson at
Tue Oct 19 15:19:31 PDT 2004

On Tue, 19 Oct 2004, Julian Elischer wrote:

> >>Another point: If you really want to keep the possibility to remove a
> >>protocol, you have to introduce some busy counter that pervents removal while
> >>the kernel is inside a protocol function. This has to be handled by the
> >>protocol itself, but it has to be taken care of somehow.
> each protocol array entry could have either a mutex or a refcount or
> both.. 

The trick here is to get just enough synchronization to not break, but not
enough to hurt.  That's one of the reasons why I feel like the heavier
weight approaches taken elsewhere may not be appropriate here.  I guess no
one is talking about loading UDP, but at the same time if we're going to
have generic loadable protocol support, it would be nice to get a pretty
clean API that would meet the requirements of higher volume protocols.  As
I mentioned in a previous e-mail, it might almost be desirable to say "no
unloading" and simply avoid the hard problems, since atomic add is easy
whereas atomic remove is hard.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at      Principal Research Scientist, McAfee Research

More information about the cvs-all mailing list