Joe Eykholt wrote:
> Robert Love wrote:
>> On Mon, 2009-03-30 at 15:20 -0700, Robert Love wrote:
>>> This patch adds a debug_logging module parameter to libfcoe.ko. It
>>> is an unsigned int that represents a bitmask of available debug
>>> logging levels, each of which can be tuned at runtime. Currently
>>> there are only two logging levels for this module-
>>> 
>>>    bit
>>> LSB 0 = libfcoe general logging
>>>     1 = FIP logging
>>> 
>>> Signed-off-by: Robert Love <[email protected]> ---
>>> 
>>>  drivers/scsi/fcoe/libfcoe.c |  101
>>>  ++++++++++++++++++++++++++----------------- 1 files changed, 61
>>> insertions(+), 40 deletions(-) 
>>> 
>>> diff --git a/drivers/scsi/fcoe/libfcoe.c
>>> b/drivers/scsi/fcoe/libfcoe.c 
>>> index f410f4a..b0180d8 100644
>>> --- a/drivers/scsi/fcoe/libfcoe.c
>>> +++ b/drivers/scsi/fcoe/libfcoe.c
>>> @@ -56,15 +56,28 @@ static void fcoe_ctlr_recv_work(struct
>>> work_struct *); 
>>> 
>>>  static u8 fcoe_all_fcfs[ETH_ALEN] = FIP_ALL_FCF_MACS;
>>> 
>>> -static u32 fcoe_ctlr_debug;        /* 1 for basic, 2 for noisy debug */
>>> +unsigned int debug_logging; +module_param(debug_logging, int,
>>> S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(debug_logging, "a bit mask of
>>> logging levels"); 
>>> 
>>> -#define FIP_DBG_LVL(level, fmt, args...)                           \
>>> -           do {                                                    \
>>> -                   if (fcoe_ctlr_debug >= (level))                 \
>>> -                           FC_DBG(fmt, ##args);                    \
>>> -           } while (0)
>>> +#define LIBFCOE_LOGGING     0x01 /* General logging, not
>>> categorized */ +#define LIBFCOE_FIP_LOGGING 0x02 /* FIP logging */
>>> 
>> Joe: I'd like to know what you think about this. I collapsed your two
>> levels of logging into just one FIP logging level. I think there was
>> only one instance of level two logging (maybe two). Do you think the
>> verbosity of your level two print statement warrants it's own logging
>> level in this new scheme?
> 
> Yes.  Or some other way to separately enable them.
> 
> The level 2 messages come out every 8 seconds or more frequently.
> The level 1 messages come out only on selection / link reset, etc., so
> the console was pretty quiet with debug at level 1.
> 
> Note that "old" FCF messages were level 1, so repeated advertisements
> that you'd already heard about were not printed.
> 
> You could just delete the level 2 debug prints, though.  I wouldn't
> miss them much. 
> 
If I just remove the level 2 logging are you OK with the basics of
this patch?
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to