cvs commit: src/sys/pci if_ste.c
bde at zeta.org.au
Sat Apr 3 19:51:16 PST 2004
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
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
- accesses to the global counter are not locked. SE_LOCK() is
Fortunately, this bad practice is missing in most network drivers.
More information about the cvs-src