From owner-cvs-all@FreeBSD.ORG Wed May 28 19:38:36 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C6C106577C; Wed, 28 May 2008 19:38:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 463028FC15; Wed, 28 May 2008 19:38:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (server.baldwin.cx [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id CC3411A4D7C; Wed, 28 May 2008 12:38:34 -0700 (PDT) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m4SJcAd8009372; Wed, 28 May 2008 15:38:27 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Christian S.J. Peron" Date: Wed, 28 May 2008 13:02:41 -0400 User-Agent: KMail/1.9.7 References: <200706150253.l5F2rpBV089069@repoman.freebsd.org> <200805071617.57772.jhb@freebsd.org> <20080527150018.GA51836@sub.vaned.net> In-Reply-To: <20080527150018.GA51836@sub.vaned.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805281302.41722.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 28 May 2008 15:38:28 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/7278/Wed May 28 11:00:15 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net bpf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2008 19:38:36 -0000 On Tuesday 27 May 2008 11:00:18 am Christian S.J. Peron wrote: > John > > Sorry for the delay. I don't think there was a reason. I just > took a look at the change and i think it should be safe to be MFCed So I just thought of one problem with these changes. They don't lock Giant around ifnet routines for non-MPSAFE ifnet drivers. I'll probably just leave 6.x alone for this reason. This might should be fixed in 7? Specifically, I'm thinking that you should be doing something like this for 7: if (ifp->if_flags & IFF_NEEDSGIANT) mtx_lock(&Giant); ifp->if_output(...); if (ifp->if_flags * IFF_NEEDSGIANT) mtx_unlock(&Giant); The patch in this commit just did NET_LOCK_GIANT/NET_UNLOCK_GIANT. For 6.x you would have to do both the IFF_NEEDSGIANT check and the NET_LOCK_GIANT stuff. > On Wed, May 07, 2008 at 04:17:57PM -0400, John Baldwin wrote: > > On Thursday 14 June 2007 10:53:51 pm Christian S.J. Peron wrote: > > > csjp 2007-06-15 02:53:51 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/net bpf.c > > > Log: > > > - Conditionally pickup Giant around the network interface > > > ioctl routines if we are running with !mpsafenet > > > - Change un-conditional Giant acquisition around ifpromisc > > > to occur only if we are running with !mpsafenet > > > > > > With these locking bits in place, we can now remove the Giant > > > requirement from BPF, so drop the D_NEEDGIANT device flag. > > > This change removes Giant acquisitions around BPF device > > > handlers (read, write, ioctl etc). > > > > > > MFC after: 1 month > > > Discussed with: rwatson > > > > Would it be ok to MFC this to 6.x? (Looks like it was just never MFC'd, was > > curious if a reason came up why it couldn't be MFC'd?) > > > > -- > > John Baldwin > -- John Baldwin