From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from s3.sipsolutions.net ([144.76.63.242]:53522 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbeDSP1A (ORCPT ); Thu, 19 Apr 2018 11:27:00 -0400 Message-ID: <1524151617.3024.25.camel@sipsolutions.net> (sfid-20180419_172706_126804_DCB1BF85) Subject: Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command. From: Johannes Berg To: Ben Greear , netdev@vger.kernel.org Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Date: Thu, 19 Apr 2018 17:26:57 +0200 In-Reply-To: <173c5f98-36bc-2e52-1e64-3a5f89008d46@candelatech.com> References: <1524016176-3881-1-git-send-email-greearb@candelatech.com> <1524086817.3024.9.camel@sipsolutions.net> <1524119910.3024.12.camel@sipsolutions.net> <173c5f98-36bc-2e52-1e64-3a5f89008d46@candelatech.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, 2018-04-19 at 08:25 -0700, Ben Greear wrote: > > In order to efficiently parse lots of stats over and over again, I probe > the stat names once on startup, map them to the variable I am trying to use > (since different drivers may have different names for the same basic stat), > and then I store the stat index. > > On subsequent stat reads, I just grab stats and go right to the index to > store the stat. > > If the stats indexes change, that will complicate my logic quite a bit. That's a good point. > Maybe the flag could be called: ETHTOOL_GS2_NO_REFRESH_FW ? Sounds more to the point to me, yeah. > > > > Also, wrt. the rest of the patch, I'd argue that it'd be worthwhile to > > write the spatch and just add the flags argument to "get_ethtool_stats" > > instead of adding a separate method - internally to the kernel it's not > > that hard to change. > > Maybe this could be in followup patches? It's going to touch a lot of files, > and might be hell to get merged all at once, and I've never used spatch, so > just maybe someone else will volunteer that part :) I guess you'll have to ask davem. :) johannes From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command. Date: Thu, 19 Apr 2018 17:26:57 +0200 Message-ID: <1524151617.3024.25.camel@sipsolutions.net> References: <1524016176-3881-1-git-send-email-greearb@candelatech.com> <1524086817.3024.9.camel@sipsolutions.net> <1524119910.3024.12.camel@sipsolutions.net> <173c5f98-36bc-2e52-1e64-3a5f89008d46@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, ath10k-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Ben Greear , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <173c5f98-36bc-2e52-1e64-3a5f89008d46-my8/4N5VtI7c+919tysfdA@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Thu, 2018-04-19 at 08:25 -0700, Ben Greear wrote: > > In order to efficiently parse lots of stats over and over again, I probe > the stat names once on startup, map them to the variable I am trying to use > (since different drivers may have different names for the same basic stat), > and then I store the stat index. > > On subsequent stat reads, I just grab stats and go right to the index to > store the stat. > > If the stats indexes change, that will complicate my logic quite a bit. That's a good point. > Maybe the flag could be called: ETHTOOL_GS2_NO_REFRESH_FW ? Sounds more to the point to me, yeah. > > > > Also, wrt. the rest of the patch, I'd argue that it'd be worthwhile to > > write the spatch and just add the flags argument to "get_ethtool_stats" > > instead of adding a separate method - internally to the kernel it's not > > that hard to change. > > Maybe this could be in followup patches? It's going to touch a lot of files, > and might be hell to get merged all at once, and I've never used spatch, so > just maybe someone else will volunteer that part :) I guess you'll have to ask davem. :) johannes From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from s3.sipsolutions.net ([2a01:4f8:191:72ef::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9BSt-0008DP-Am for ath10k@lists.infradead.org; Thu, 19 Apr 2018 15:27:17 +0000 Message-ID: <1524151617.3024.25.camel@sipsolutions.net> Subject: Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command. From: Johannes Berg Date: Thu, 19 Apr 2018 17:26:57 +0200 In-Reply-To: <173c5f98-36bc-2e52-1e64-3a5f89008d46@candelatech.com> References: <1524016176-3881-1-git-send-email-greearb@candelatech.com> <1524086817.3024.9.camel@sipsolutions.net> <1524119910.3024.12.camel@sipsolutions.net> <173c5f98-36bc-2e52-1e64-3a5f89008d46@candelatech.com> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Ben Greear , netdev@vger.kernel.org Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org On Thu, 2018-04-19 at 08:25 -0700, Ben Greear wrote: > > In order to efficiently parse lots of stats over and over again, I probe > the stat names once on startup, map them to the variable I am trying to use > (since different drivers may have different names for the same basic stat), > and then I store the stat index. > > On subsequent stat reads, I just grab stats and go right to the index to > store the stat. > > If the stats indexes change, that will complicate my logic quite a bit. That's a good point. > Maybe the flag could be called: ETHTOOL_GS2_NO_REFRESH_FW ? Sounds more to the point to me, yeah. > > > > Also, wrt. the rest of the patch, I'd argue that it'd be worthwhile to > > write the spatch and just add the flags argument to "get_ethtool_stats" > > instead of adding a separate method - internally to the kernel it's not > > that hard to change. > > Maybe this could be in followup patches? It's going to touch a lot of files, > and might be hell to get merged all at once, and I've never used spatch, so > just maybe someone else will volunteer that part :) I guess you'll have to ask davem. :) johannes _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k