From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from s3.sipsolutions.net ([5.9.151.49]:44528 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbbEDHnU (ORCPT ); Mon, 4 May 2015 03:43:20 -0400 Message-ID: <1430725394.2013.5.camel@sipsolutions.net> (sfid-20150504_094322_680800_A624D2F9) Subject: Re: [PATCH] backports: mac80211: revert to old stats behaviour for older kernels From: Johannes Berg To: Arend van Spriel Cc: "Luis R. Rodriguez" , backports@vger.kernel.org Date: Mon, 04 May 2015 09:43:14 +0200 In-Reply-To: <55467BCF.8040705@broadcom.com> References: <1430487994-20598-1-git-send-email-arend@broadcom.com> (sfid-20150501_154642_126166_7597CA83) <1430680059.3276.1.camel@sipsolutions.net> <55467BCF.8040705@broadcom.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: backports-owner@vger.kernel.org List-ID: On Sun, 2015-05-03 at 21:49 +0200, Arend van Spriel wrote: > I don't either, but I had a bunch of test systems that I wanted to get > going. While on vacation? :) > > What part of this isn't supported? Is there no pointer whatsoever that > > we can use? We still implement the ndo_getstats64 [or whatever it's > > called] ourselves anyway, so we don't really use any API here apart from > > * netdev_alloc_pcpu_stats, which is trivially backported > > * dev->tstats, which is just a single pointer and we could use anything > > else, > > even perhaps in sdata > > I have to learn about the per-cpu operations someday so why not now > while spending two weeks vacation ;-) Heh. Go enjoy your vacation, I can handle this :) I think you arrived at kernel 3.14 due to 8f84985fec10d. However, I think we can just do the following * backport "struct pcpu_sw_netstats" (needed on < 3.14) * backport "netdev_alloc_pcpu_stats" (needed on < 3.15) * make an spatch replacing dev->tstats with ((struct pcpu_sw_netstats *)dev->ml_priv) (since ml_priv has existed for a long time, and they're in a union) johannes