From: Stephen Hemminger <shemminger@vyatta.com>
To: "Franky Lin" <frankyl@broadcom.com>
Cc: "Arend Van Spriel" <arend@broadcom.com>,
"John W. Linville" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
Date: Thu, 5 Jan 2012 21:00:01 -0800 [thread overview]
Message-ID: <20120105210001.600aacd3@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <4F05FC76.5070509@broadcom.com>
On Thu, 5 Jan 2012 11:39:34 -0800
"Franky Lin" <frankyl@broadcom.com> wrote:
> On 01/05/2012 11:15 AM, Stephen Hemminger wrote:
> > On Thu, 5 Jan 2012 20:12:12 +0100
> > "Arend van Spriel"<arend@broadcom.com> wrote:
> >
> >> On 01/05/2012 07:39 PM, Stephen Hemminger wrote:
> >>> Minor space savings. Compile tested only.
> >>>
> >>
> >> This is actually not going to work. The struct brcmf_if represents
> >> individual interfaces which each have their own device statistics.
> >>
> >
> > Why not, if you look it is only used during the aggregation and return
> > of netdevice stats.
> >
>
> We only support one primary interface at the moment. But we have plan to
> add P2P support using virtual interfaces. It would be better to have
> individual stats for different interfaces.
>
> Thanks,
> Franky
>
You are confused. The only place the data in question is used is:
static struct net_device_stats *brcmf_netdev_get_stats
This is a per-network device standard API and it returns per-network device
statistics. Several releases ago, structure element was added to the network_device
struct for common usage by drivers. All this patch does is use that instead of the
private device scratch pad.
If you really want to be more clever, the device should be convert to the
new getstats64 API, but that requires more work (like wrapping updates with
the u64_stats_sync() macros.
next prev parent reply other threads:[~2012-01-06 5:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120105183947.295358582@vyatta.com>
2012-01-05 18:39 ` [PATCH 1/3] ath6kl: make net_device_ops const Stephen Hemminger
2012-01-09 14:40 ` Kalle Valo
2012-01-05 18:39 ` [PATCH 1/2] brcmf: " Stephen Hemminger
[not found] ` <20120105184000.572918423@vyatta.com>
2012-01-05 19:12 ` [PATCH 2/2] brcmfmac: use existing net_device_stats Arend van Spriel
2012-01-05 19:15 ` Stephen Hemminger
2012-01-05 19:39 ` Franky Lin
2012-01-06 5:00 ` Stephen Hemminger [this message]
2012-01-06 20:07 ` Franky Lin
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=20120105210001.600aacd3@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=arend@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).