On Fri, 13 Dec 2002, Kelly Yancey wrote:
>
> Is there any particular reason that the raw socket implementation in
> net/raw_usrreq.c does not require splnet() protection? It seems as though
> adding splnet()/splx() calls to the various raw_* routines would greatly
> reduce the size of net/rtsock.c, in which many of the routines simply wrap
> their raw_ counterparts with splnet()/splx().
> Currently, it appears that routing sockets are the only consumer of the raw
> socket interface at the moment, but if another consumer were to exist then
> they would have to do the same splnet()/splx() hackery I imagine. Wouldn't it
> make sense to just put the logic into net/raw_usrreq.c and be done with it?
>
> Any insight would be appreciated. Thanks,
>
> Kelly
>
Actually, as a follow-up to my own question, I don't see how the
splnet()/splx() calls in rtsock.c are necessary at all as all of the pru_*
hooks are called at splnet(). Being that rtsock's pru_* hooks are called at
splnet(), is there any reason not to just extern the various raw_* pru hooks
and reference them directly from route_usrreqs?
Kelly
--
Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org}
FreeBSD, The Power To Serve: http://www.freebsd.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message