Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3639346pxv; Mon, 5 Jul 2021 02:10:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiScQw3UhLXaI63Nexheh4EEhi+jwK5BFgzeNw6oG04L5LsArx/hFu9Y8t89TXVVkE/LMB X-Received: by 2002:aa7:dd93:: with SMTP id g19mr15166158edv.35.1625476243670; Mon, 05 Jul 2021 02:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625476243; cv=none; d=google.com; s=arc-20160816; b=xf53bci4fPGNW19CMnhOMcKjR/CyeF6tAYQ4D8bLQVaPx/WJldOSYdPOdx3EO0lv2u TAk130/vw3beq2355oKpyfpVCmv0Y34EiKL8A6RUnq7jAp/jBWMWl3OSNRUEGv0TVfCp w9z8n0zBPAWUvdNvmaIqQ1Xufrb6alGevtTiJ2Tq9Q/yzRpNMp4WiT6vmQoUm6MzDjEa EhfyBgT/OnBJQKHlBt1hWHtYm05tkIcplBa4shpqDdAoEW2pBv6ViCRw3lFvuL/yAFLY VnLzpy01Xax+MeVnd1hg7rd1GPVR45Bv5vjhHZnk9ZkqqVbMLwJ9qQqrtcdles8HjoRv 9kYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Ch+vnRUZckUHjsrWxTVRmy8cOIJwmGXhZZwpJKz8zBU=; b=z3W5c4ghOQW5XhkIWAovQgkAGKy/64PQ5RZpMmwezKIUbqO+6H64ObD04rnIDH8I/Y k7/aZr4PkrQCg/WUoSwr+zPYG2upxdviSGviy/D1Wnt5e9Fc6lWJsYXUfi4IwMVAK+m+ 6M+Pa4tHV4nG74V9aq3vl/mHSbhdVaXGQLtmDjGTbvcilrhVOci1bLlP0ED2TYvXznT2 BwMadyHU4T9HmMlxgu4Q+iHBSJ9jNes9UbkgkIX7sHFASYdymUe/whcmtAAyP8FRT0Ee ZO7U+MYTxUGc7fXiJ0VLs6zQUVlSG2wwwzoVkkR7Yts0esg+MIz8Xx3BmORU9VeaTXhK B3IA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l33si13832689ede.457.2021.07.05.02.09.58; Mon, 05 Jul 2021 02:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbhGEJMP (ORCPT + 99 others); Mon, 5 Jul 2021 05:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbhGEJMO (ORCPT ); Mon, 5 Jul 2021 05:12:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49FDBC061574 for ; Mon, 5 Jul 2021 02:09:38 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0Kbe-0002JL-8S; Mon, 05 Jul 2021 11:09:34 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1m0Kbd-0003q2-CK; Mon, 05 Jul 2021 11:09:33 +0200 Date: Mon, 5 Jul 2021 11:09:33 +0200 From: Oleksij Rempel To: Pkshih Cc: Brian Norris , "" , linux-wireless , Sascha Hauer , Kalle Valo Subject: Re: [PATCH 04/24] rtw89: add debug files Message-ID: <20210705090933.yasowqdel4ifnjgl@pengutronix.de> References: <20210618064625.14131-1-pkshih@realtek.com> <20210618064625.14131-5-pkshih@realtek.com> <20210702072308.GA4184@pengutronix.de> <20210702175740.5cdhmfp4ldiv6tn7@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 11:08:57 up 214 days, 23:15, 48 users, load average: 0.23, 0.16, 0.06 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, Jul 05, 2021 at 08:58:51AM +0000, Pkshih wrote: > > > -----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; ; Sascha Hauer > > Subject: Re: [PATCH 04/24] rtw89: add debug files > > > > On Fri, Jul 2, 2021 at 10:57 AM Oleksij Rempel 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 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. OK, understand. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |