All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 2/2] mac80211:  Support getting sta_info stats via ethtool.
Date: Thu, 15 Mar 2012 12:03:53 -0700	[thread overview]
Message-ID: <4F623D19.7090105@candelatech.com> (raw)
In-Reply-To: <1331837740.3432.39.camel@jlt3.sipsolutions.net>

On 03/15/2012 11:55 AM, Johannes Berg wrote:
> Ok more technical look ...
>
>
> It doesn't look like NUM_STA_INFO_STATS gets used at all, or am I
> missing it?
>
>> +static int ieee80211_get_et_sset_count(struct wiphy *wiphy,
>> +				       struct net_device *dev,
>> +				       int sset)
>> +{
>> +	switch (sset) {
>> +	case ETH_SS_STATS:
>> +		return STA_STATS_LEN;
>
> Are there different "s* sets" that could be used to return different
> types of stats, or how does this work?

Yes, there are diag strings too, I think..but I wasn't
planning to add support for that, though perhaps someone
else might know how to do that.

>> +	mutex_lock(&sdata->local->sta_mtx);
>
> Why not use RCU? The mutex doesn't really protect anything useful here
> except for the list iteration.

No reason.  I'll try to make it RCU instead.

>> +	list_for_each_entry(sta,&sdata->local->sta_list, list) {
>
> That's not right -- these stats are per netdev so you should only
> aggregate for the netdev, no?

Ummm, maybe so.  I had trouble figuring out how to find
the sta entries that are associated with a netdev, and I'd
like to sum up all station entries for an AP interfaces.

If you know of any code that uses this, a pointer would
be welcome.

>> +		BUG_ON(i != STA_STATS_LEN);
>
> That I really don't like much.

Ok, I'll remove it from a final patch.  It catches bugs
in the meantime (miss a comma between strings and
it blows up spectacularly :P).

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2012-03-15 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 17:39 [RFC 1/2] cfg80211: Add framework to support ethtool stats greearb
2012-03-15 17:39 ` [RFC 2/2] mac80211: Support getting sta_info stats via ethtool greearb
2012-03-15 18:52   ` Johannes Berg
2012-03-15 18:56     ` Ben Greear
2012-03-16 13:49       ` John W. Linville
2012-03-16 14:18         ` Florian Fainelli
2012-03-16 14:54           ` Ben Greear
2012-03-16 14:59             ` Florian Fainelli
2012-03-16 16:39               ` Ben Greear
2012-03-16 17:14               ` Rick Jones
2012-03-15 18:55   ` Johannes Berg
2012-03-15 19:03     ` Ben Greear [this message]
2012-03-15 19:05       ` Johannes Berg
2012-03-15 18:50 ` [RFC 1/2] cfg80211: Add framework to support ethtool stats Johannes Berg
2012-03-15 18:52   ` Ben Greear

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=4F623D19.7090105@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.