From owner-freebsd-net Fri Dec 13 19:59:26 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADB5237B401 for ; Fri, 13 Dec 2002 19:59:25 -0800 (PST) Received: from pimout2-ext.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDA8643E4A for ; Fri, 13 Dec 2002 19:59:24 -0800 (PST) (envelope-from kbyanc@posi.net) Received: from gateway.posi.net (adsl-63-201-91-63.dsl.snfc21.pacbell.net [63.201.91.63]) by pimout2-ext.prodigy.net (8.12.3 da nor stuldap/8.12.3) with ESMTP id gBE3xNDL100028 for ; Fri, 13 Dec 2002 22:59:23 -0500 Received: from localhost (localhost [127.0.0.1]) by gateway.posi.net (8.12.6/8.12.5) with ESMTP id gBE3xMYl033749 for ; Fri, 13 Dec 2002 19:59:22 -0800 (PST) (envelope-from kbyanc@posi.net) Date: Fri, 13 Dec 2002 19:59:22 -0800 (PST) From: Kelly Yancey To: net@FreeBSD.org Subject: Re: Raw sockets and splnet() In-Reply-To: <20021213191946.Y33706-100000@gateway.posi.net> Message-ID: <20021213194809.N33726-100000@gateway.posi.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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