Date: Fri, 13 Dec 2002 19:59:22 -0800 (PST) From: Kelly Yancey <kbyanc@posi.net> To: net@FreeBSD.org Subject: Re: Raw sockets and splnet() Message-ID: <20021213194809.N33726-100000@gateway.posi.net> In-Reply-To: <20021213191946.Y33706-100000@gateway.posi.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021213194809.N33726-100000>