Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2007 01:54:01 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Randall Stewart <rrs@cisco.com>
Cc:        current@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: KTR and SCTP
Message-ID:  <20070614055401.GA77538@rot13.obsecurity.org>
In-Reply-To: <4670B1A0.4070706@cisco.com>
References:  <46706E63.1080906@cisco.com> <20070614022510.GA61989@rot13.obsecurity.org> <4670B1A0.4070706@cisco.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 13, 2007 at 11:10:24PM -0400, Randall Stewart wrote:
> Kris Kennaway wrote:
> >On Wed, Jun 13, 2007 at 06:23:31PM -0400, Randall Stewart wrote:
> >
> >>All:
> >>
> >>I am in the process of converting all the logging that
> >>SCTP does to use the KTR sub-system. This will fit
> >>nicely.. I still need to do some things to make it
> >>so I can pull out the logs and make pretty charts and
> >>graphs (in SCTP its used for debugging but also exploring
> >>how CC and other niceties works)..
> >>
> >>But I was wondering.. would anyone mind if I took
> >>KTR_SPARE2
> >>
> >>and made it:
> >>
> >>KTR_SCTP_SUBSYS
> >>
> >>I have a huge amount of tracing under SCTP now.. so
> >>many I am setting in a seperate mask set to enable/disable
> >>various pieces of it.. So I was thinking it would
> >>warrent a sub-system of its own :-D
> >>
> >>Any objections? If not I will change it :-D
> >
> >
> >Yeah, we really do need to keep those spare fields for local use.
> >
> >Kris
> >
> Ok.. so I will just use
> 
> KTR_SPARE2
> 
> in my logs then I guess.. :-)

You can't use KTR_SPARE* in committed code either, or it's no longer
spare :) You should do something like:

i.e. do something like

#ifdef SCTP_TRACE
#define KTR_SCTP KTR_SUBSYS
#else
#define KTR_SCTP 0
#endif

see the comment in <sys/ktr.h>

 * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that
 * they are really placeholders so that indvidual drivers and subsystems
 * can map their internal tracing to the general class when they wish to
 * have tracing enabled and map it to 0 when they don't.

Kris



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