From owner-cvs-all@FreeBSD.ORG Sat Apr 3 19:51:16 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE29D16A4CE; Sat, 3 Apr 2004 19:51:16 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 018B443D48; Sat, 3 Apr 2004 19:51:16 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i343pF5v023272; Sun, 4 Apr 2004 13:51:15 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i343pCsg007115; Sun, 4 Apr 2004 13:51:13 +1000 Date: Sun, 4 Apr 2004 13:51:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alexey Dokuchaev In-Reply-To: <20040403200844.GA18516@regency.nsu.ru> Message-ID: <20040404134458.C2452@gamplex.bde.org> References: <20040331211028.37B5016A4E2@hub.freebsd.org> <20040331134609.N90425@root.org> <20040401105857.GA72284@regency.nsu.ru> <20040403200844.GA18516@regency.nsu.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Ruslan Ermilov cc: cvs-all@freebsd.org cc: Nate Lawson Subject: Re: cvs commit: src/sys/pci if_ste.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Sun, 04 Apr 2004 03:51:16 -0000 On Sun, 4 Apr 2004, Alexey Dokuchaev wrote: > On Thu, Apr 01, 2004 at 04:50:11PM +0300, Ruslan Ermilov wrote: > > On Thu, Apr 01, 2004 at 05:58:57PM +0700, Alexey Dokuchaev wrote: > > > On Thu, Apr 01, 2004 at 09:42:41AM +0300, Ruslan Ermilov wrote: > > > > On Wed, Mar 31, 2004 at 01:47:16PM -0800, Nate Lawson wrote: > > [...] > > > > > This pollutes the toplevel hw sysctl space. Please move it to > > > > > hw.ste.rxsyncs or better, debug.*. > > > > > > > > > Seems I followed the bad practice from dc(4) and fxp(4). I will > > > > move it to hw.ste, thanks. > > > > > > Care to fix this "bad practice" in dc(4) and fxp(4) as well? :) Or > > > should we wait for their maintainers, or possibly filling the PR ? > > > > > Better submit a patch, it should be pretty trivial. ;) > > OK, I'll do it in a couple of days, hopefully for both dc(4) and fxp(4). Using sysctl in device drivers is bad practice, but fixing this is nontrivial. Bugs result from this bad practice even for the new sysctl in if_ste.c: - the counter is global but the problem is per-interface. Sysctls using globals are easy to hack up, but this don't work so well for multiple interfaces. - accesses to the global counter are not locked. SE_LOCK() is per-interface. Fortunately, this bad practice is missing in most network drivers. Bruce