Re: [PATCH v3 1/7] Documentation: dynamic-debug: Add description of level bitmask

From: Edward Cree
Date: Tue Jun 09 2020 - 13:43:17 EST


On 09/06/2020 17:58, Joe Perches wrote:
> On Tue, 2020-06-09 at 13:16 +0200, Greg Kroah-Hartman wrote:
>> What is wrong with the existing control of dynamic
>> debug messages that you want to add another type of arbitrary grouping
>> to it?
> There is no existing grouping mechanism.
>
> Many drivers and some subsystems used an internal one
> before dynamic debug.
>
> $ git grep "MODULE_PARM.*\bdebug\b"|wc -l
> 501
>
> This is an attempt to unify those homebrew mechanisms.
In network drivers, this is probablyusing the existing groupings
Âdefined by netif_level() - see NETIF_MSG_DRV and friends. Note
Âthat those groups are orthogonal to the level, i.e. they control
Ânetif_err() etc. as well, not just debug messages.
Certainly in the case of sfc, and I'd imagine for many other net
Âdrivers too, the 'debug' modparam is setting the default for
Ânet_dev->msg_enable, which can be changed after probe with
Âethtool.
It doesn't look like the proposed mechanism subsumes that (we have
Ârather more than 5 groups, and it's not clear how you'd connect
Âit to the existing msg_enable (which uapi must be maintained); if
Âyou don't have a way to do this, better exclude drivers/net/ from
Âyour grep|wc because you won't be unifying those - in my tree
Âthat's 119 hits.

-ed