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