Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2010 13:48:13 -0700
From:      "David Christensen" <davidch@broadcom.com>
To:        "pyunyh@gmail.com" <pyunyh@gmail.com>
Cc:        Tom Judge <tom@tomjudge.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   RE: bce(4) un hiding adapter info
Message-ID:  <5D267A3F22FD854F8F48B3D2B52381933B5A78B55C@IRVEXCHCCR01.corp.ad.broadcom.com>
In-Reply-To: <20100923182033.GA15014@michelle.cdnetworks.com>
References:  <4C9B8A50.9060602@tomjudge.com> <5D267A3F22FD854F8F48B3D2B52381933B5A78B444@IRVEXCHCCR01.corp.ad.broadcom.com> <20100923182033.GA15014@michelle.cdnetworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > What I'd really like to do is revamp the debug code so that it
> > can be enabled/disabled on the fly rather than requiring that
> > the driver be compiled.  Adding some performance stuff would
>=20
> Couldn't it be implemented with sysctl? Users may set a variable
> something like dev.bce.0.diag_bitmap to activate debugging code.
> But it seems that requires a lot of code changes.

I already have an extensive amount of conditionally compiled
debug code in the driver which uses a bitmap to adjust the=20
debug spew.  For personal testing I've also added a sysctl
to allow that value to be modified at runtime.  My concerns
are from a security standpoint (some of the debug code allows
direct register access), a code size perspective (adds a lot
of code most people don't use), and the performance penalty
(lots of bitmap checking even when all debug spew is turned
off). =20

Probably worth the time to pull the most useful stuff into
the production driver and leave the more obscure code in the
debug only build.  If there are no complaints I'll add that
to my task list.

Dave




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D267A3F22FD854F8F48B3D2B52381933B5A78B55C>