From owner-freebsd-arch Mon Jun 4 11:10:34 2001 Delivered-To: freebsd-arch@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id D064837B419; Mon, 4 Jun 2001 11:10:03 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f54I9xG17035; Mon, 4 Jun 2001 11:09:59 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010604094503.A43248@comp.chem.msu.su> Date: Mon, 04 Jun 2001 11:10:03 -0700 (PDT) From: John Baldwin To: Yar Tikhiy Subject: Re: cvs commit: src/sys/net if_gif.c Cc: freebsd-arch@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Greg Lehey Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 04-Jun-01 Yar Tikhiy wrote: > [Added freebsd-arch to the Cc: list] > > On Mon, Jun 04, 2001 at 09:48:27AM +0930, Greg Lehey wrote: >> On Sunday, 3 June 2001 at 10:31:11 -0700, Yar Tikhiy wrote: >> > yar 2001/06/03 10:31:11 PDT >> > >> > Modified files: >> > sys/net if_gif.c >> > Log: >> > First, wrap the if_up() call into splimp()/splx() because >> > if_up() must be called at splnet or higher. >> > Second, set the IFF_RUNNING flag on an interface after its >> > resources (i.e. tunnel source and destination addresses) >> > have been set. Note that we don't set IFF_UP because it is >> > if_up()'s job to do that. >> >> Presumably this is in preparation for an MFC? splimp() and splx() are >> nops in -CURRENT. > > Thank you for pointing me out that. Indeed, I've missed the change. > > BTW, could anyone tell me what is the modern state of affairs as > to locks in the networking code? The comments and man pages are > still talking about splnet in -current, so they need to be fixed, > but what should one write there instead? The IF_ENQUEUE case is > obvious: Forget about splnet() and the manual modification of > counters, just use IF_HANDOFF instead of IF_ENQUEUE. But what about > other places where splnet/splimp is used? There are quite a few of > them there... The networking stack is not locked with locks yet, so just use spl's for now. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message