All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Adrian Chadd <adrian@freebsd.org>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: add configurable debugging.
Date: Wed, 31 May 2017 11:53:13 +0000	[thread overview]
Message-ID: <8737blnsz6.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20170510211925.17468-1-adrian@freebsd.org> (Adrian Chadd's message of "Wed, 10 May 2017 14:19:25 -0700")

Adrian Chadd <adrian@freebsd.org> writes:

> This adds a few configurable debugging options:
>
> * driver debugging and tracing is now configurable per device

So this means that there's a debugfs file
/sys/kernel/debug/ieee80211/phy0/ath10k/debug for every ath10k device.
Sounds like a good idea. I just don't like the name of file, would
debug_mask be more descriptive?

> * driver debugging and tracing is now configurable at runtime

Correction, debug_mask has been always to possible change via
/sys/module/ath10k_core/parameters/debug_mask file. Now it doesn't work
anymore, which is ok, but I think we should make it clear for users as
well.

I wonder would that work if we change the mask to 0444:

module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);

> * the debugging / tracing is not run at all (besides a mask check)
>   unless the specific debugging bitmap field is configured.

So I guess with this you mean that the function ath10k_dbg() is not
called if debug messages are disabled? This is something which is good
to do in another patch. And the original assumption was that if you care
about performance you won't even enable CONFIG_ATH10K_DEBUG, so that
path was not optimised in any way. How much benefit does this bring?

> --- a/drivers/net/wireless/ath/ath10k/debug.c
> +++ b/drivers/net/wireless/ath/ath10k/debug.c
> @@ -2418,6 +2418,79 @@ int ath10k_debug_create(struct ath10k *ar)
>  	return 0;
>  }
> =20
> +#ifdef	CONFIG_ATH10K_DEBUGFS
> +static ssize_t ath10k_write_debug_mask(struct file *file,
> +				       const char __user *ubuf,
> +				       size_t count, loff_t *ppos)
> +{

The ifdef looks wrong, it's already inside CONFIG_ATH10K_DEBUGFS. Was it
supposed to be CONFIG_ATH10K_DEBUG?

--=20
Kalle Valo=

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Adrian Chadd <adrian@freebsd.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: add configurable debugging.
Date: Wed, 31 May 2017 11:53:13 +0000	[thread overview]
Message-ID: <8737blnsz6.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20170510211925.17468-1-adrian@freebsd.org> (Adrian Chadd's message of "Wed, 10 May 2017 14:19:25 -0700")

Adrian Chadd <adrian@freebsd.org> writes:

> This adds a few configurable debugging options:
>
> * driver debugging and tracing is now configurable per device

So this means that there's a debugfs file
/sys/kernel/debug/ieee80211/phy0/ath10k/debug for every ath10k device.
Sounds like a good idea. I just don't like the name of file, would
debug_mask be more descriptive?

> * driver debugging and tracing is now configurable at runtime

Correction, debug_mask has been always to possible change via
/sys/module/ath10k_core/parameters/debug_mask file. Now it doesn't work
anymore, which is ok, but I think we should make it clear for users as
well.

I wonder would that work if we change the mask to 0444:

module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);

> * the debugging / tracing is not run at all (besides a mask check)
>   unless the specific debugging bitmap field is configured.

So I guess with this you mean that the function ath10k_dbg() is not
called if debug messages are disabled? This is something which is good
to do in another patch. And the original assumption was that if you care
about performance you won't even enable CONFIG_ATH10K_DEBUG, so that
path was not optimised in any way. How much benefit does this bring?

> --- a/drivers/net/wireless/ath/ath10k/debug.c
> +++ b/drivers/net/wireless/ath/ath10k/debug.c
> @@ -2418,6 +2418,79 @@ int ath10k_debug_create(struct ath10k *ar)
>  	return 0;
>  }
>  
> +#ifdef	CONFIG_ATH10K_DEBUGFS
> +static ssize_t ath10k_write_debug_mask(struct file *file,
> +				       const char __user *ubuf,
> +				       size_t count, loff_t *ppos)
> +{

The ifdef looks wrong, it's already inside CONFIG_ATH10K_DEBUGFS. Was it
supposed to be CONFIG_ATH10K_DEBUG?

-- 
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2017-05-31 11:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 21:19 [PATCH] ath10k: add configurable debugging Adrian Chadd
2017-05-10 21:19 ` Adrian Chadd
2017-05-19  9:51 ` Kalle Valo
2017-05-19  9:51   ` Kalle Valo
2017-05-31 11:53 ` Kalle Valo [this message]
2017-05-31 11:53   ` Kalle Valo
2017-05-31 12:16 ` Kalle Valo
2017-05-31 12:16   ` Kalle Valo
2017-05-31 20:20   ` Arend van Spriel
2017-05-31 20:20     ` Arend van Spriel
2017-05-31 20:23     ` Adrian Chadd
2017-05-31 20:23       ` Adrian Chadd
2017-05-31 21:28       ` Arend van Spriel
2017-05-31 21:28         ` Arend van Spriel
2017-05-31 21:32         ` Adrian Chadd
2017-05-31 21:32           ` Adrian Chadd
2017-06-01 13:34       ` Kalle Valo
2017-06-01 13:34         ` Kalle Valo
2017-06-01 13:24     ` Kalle Valo
2017-06-01 13:24       ` Kalle Valo
2017-06-01 13:33       ` Adrian Chadd
2017-06-01 13:33         ` Adrian Chadd
  -- strict thread matches above, loose matches on Subject: below --
2017-05-10 16:25 Adrian Chadd
2017-05-10 16:25 ` Adrian Chadd
2017-05-10 16:44 ` Steve deRosier
2017-05-10 16:44   ` Steve deRosier
2017-05-10 16:50   ` Adrian Chadd
2017-05-10 16:50     ` Adrian Chadd
2017-05-19  9:47 ` Kalle Valo
2017-05-19  9:47   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737blnsz6.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=adrian@freebsd.org \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.