netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pkshih <pkshih@realtek.com>
To: Brian Norris <briannorris@chromium.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"<netdev@vger.kernel.org>" <netdev@vger.kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: RE: [PATCH 04/24] rtw89: add debug files
Date: Mon, 5 Jul 2021 08:58:51 +0000	[thread overview]
Message-ID: <f74caecfafa6479abe09bede01e801ec@realtek.com> (raw)
In-Reply-To: <CA+ASDXP0_Y1x_1OixJFWDCeZX3txV+xbwXcXfTbw1ZiGjSFiCQ@mail.gmail.com>


> -----Original Message-----
> From: Brian Norris [mailto:briannorris@chromium.org]
> Sent: Saturday, July 03, 2021 2:38 AM
> To: Oleksij Rempel
> Cc: Pkshih; Kalle Valo; linux-wireless; <netdev@vger.kernel.org>; Sascha Hauer
> Subject: Re: [PATCH 04/24] rtw89: add debug files
> 
> On Fri, Jul 2, 2021 at 10:57 AM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> > On Fri, Jul 02, 2021 at 10:08:53AM -0700, Brian Norris wrote:
> > > On Fri, Jul 2, 2021 at 12:23 AM Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> > > > For dynamic debugging we usually use ethtool msglvl.
> > > > Please, convert all dev_err/warn/inf.... to netif_ counterparts
> > >
> > > Have you ever looked at a WiFi driver?
> >
> > Yes. You can parse the kernel log for my commits.
> 
> OK! So I see you've touched a lot of ath9k, >3 years ago. You might
> notice that it is one such example -- it supports exactly the same
> kind of debugfs file, with a set of ath_dbg() log types. Why doesn't
> it use this netif debug logging?
> 
> > > I haven't seen a single one that uses netif_*() for logging.
> > > On the other hand, almost every
> > > single one has a similar module parameter or debugfs knob for enabling
> > > different types of debug messages.
> > >
> > > As it stands, the NETIF_* categories don't really align at all with
> > > the kinds of message categories most WiFi drivers support. Do you
> > > propose adding a bunch of new options to the netif debug feature?
> >
> > Why not? It make no sense or it is just "it is tradition, we never do
> > it!" ?
> 
> Well mainly, I don't really like people dreaming up arbitrary rules
> and enforcing them only on new submissions. If such a change was
> Recommended, it seems like a better first step would be to prove that
> existing drivers (where there are numerous examples) can be converted
> nicely, instead of pushing the work to new contributors arbitrarily.
> Otherwise, the bar for new contributions gets exceedingly high -- this
> one has already sat for more than 6 months with depressingly little
> useful feedback.
> 
> I also know very little about this netif log level feature, but if it
> really depends on ethtool (seems like it does?) -- I don't even bother
> installing ethtool on most of my systems. It's much easier to poke at
> debugfs, sysfs, etc., than to construct the relevant ethtool ioctl()s
> or netlink messages. It also seems that these debug knobs can't be set
> before the driver finishes coming up, so one would still need a module
> parameter to mirror some of the same features. Additionally, a WiFi
> driver doesn't even have a netdev to speak of until after a lot of the
> interesting stuff comes up (much of the mac80211 framework focuses on
> a |struct ieee80211_hw| and a |struct wiphy|), so I'm not sure your
> suggestion really fits these sorts of drivers (and the things they
> might like to support debug-logging for) at all.
> 
> Anyway, if Ping-Ke wants to paint this bikeshed for you, I won't stop him.

I encounter the problems you mentioned mostly:
1. no netdev to be the parameter 'dev' of 'netif_dbg(priv, type, dev, format, args...)'
2. predefined 'type' isn't enough for wifi application. There're many wifi- or vendor-
   specific components, such as RF calibration, BT coexistence, DIG, CFO and so on.

So, I don't plan to change them for now.

--
Ping-Ke



  parent reply	other threads:[~2021-07-05  8:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210618064625.14131-1-pkshih@realtek.com>
     [not found] ` <20210618064625.14131-5-pkshih@realtek.com>
     [not found]   ` <20210702072308.GA4184@pengutronix.de>
     [not found]     ` <CA+ASDXNjHJoXgRAM4E7TcLuz9zBmQkaBMuhK2DEVy3dnE-3XcA@mail.gmail.com>
2021-07-02 17:57       ` [PATCH 04/24] rtw89: add debug files Oleksij Rempel
2021-07-02 18:38         ` Brian Norris
2021-07-02 19:32           ` Oleksij Rempel
2021-07-02 20:00             ` Brian Norris
2021-07-03  4:15               ` Oleksij Rempel
2021-07-13  1:40                 ` Brian Norris
2021-07-05  8:58           ` Pkshih [this message]
2021-07-05  9:09             ` Oleksij Rempel
2021-07-05  8:08         ` Kalle Valo
2021-07-05  9:23           ` Oleksij Rempel

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=f74caecfafa6479abe09bede01e801ec@realtek.com \
    --to=pkshih@realtek.com \
    --cc=briannorris@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).