bce(4) un hiding adapter info

David Christensen davidch at broadcom.com
Thu Sep 23 20:50:45 UTC 2010


> > 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
> 
> 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 
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).  

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



More information about the freebsd-net mailing list