Re: KTR and SCTP

From: Randall Stewart <rrs_at_cisco.com>
Date: Thu, 14 Jun 2007 07:59:30 -0400
Kris Kennaway wrote:
> 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
> 
k

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 803-317-4952 (cell)
Received on Thu Jun 14 2007 - 09:57:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC