All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: YanBo <dreamfly281@gmail.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: Fix survey information reporting
Date: Fri, 05 Jun 2015 13:18:45 -0700	[thread overview]
Message-ID: <55720425.2050604@candelatech.com> (raw)
In-Reply-To: <5571F70D.4020101@candelatech.com>

I think the wrapping might be even more weird that previously suspected.  Here is output from my
system.

It looks to me that when cycle count overflows, it right-shifts all of these
counters one bit.  Clever, I guess, but surely a pain in the ass to deal with!


while true; do cat /debug/ieee80211/wiphy0/ath10k/fw_stats|head -10|tail -4; date; echo;sleep 1; done
....
                TX frame count  131810463
                RX frame count 2326362883
                RX clear count 2542947851
                   Cycle count 4180338939
Fri Jun  5 13:13:48 PDT 2015

                TX frame count  134407497
                RX frame count 2374518035
                RX clear count 2595337341
                   Cycle count 4269010333
Fri Jun  5 13:13:49 PDT 2015

                TX frame count   69523007
                RX frame count 1229973316
                RX clear count 1344131636
                   Cycle count 2210412416
Fri Jun  5 13:13:50 PDT 2015

                TX frame count   72305753
                RX frame count 1280184579
                RX clear count 1398937635
                   Cycle count 2299234941
Fri Jun  5 13:13:51 PDT 2015

                TX frame count   75050021
                RX frame count 1330205664
                RX clear count 1453548082
                   Cycle count 2387901854
Fri Jun  5 13:13:52 PDT 2015


Thanks,
Ben


On 06/05/2015 12:22 PM, Ben Greear wrote:
> On 06/05/2015 12:10 PM, YanBo wrote:
>> On Fri, Jun 5, 2015 at 10:14 AM, Ben Greear <greearb@candelatech.com> wrote:
>>> I applied these and some other related patches to my hacked-upon 4.0.4, but
>>> I am seeing some inconsistencies between how ath10k and ath9k
>>> reports survey info.  I am using my CT firmware based on 10.1.
>>>
>>> ath9k reports ever-increasing counters for the channel time
>>> and busy time.
>>>
>>> With ath10k, it reports the same values until I do a scan
>>> again, and even then, it is not additive.
>>>
>>> First, should the value only update when we do a scan?
>>>
>>> And second, should ath10k report ever increasing totals
>>> to match ath9k behaviour?
>>>
>>
>> It should be match with ath9k, but the ath10k doesn't accumulate the
>> survey count at currently code,
>> I drafted a patch to fix this issue, will send to public mailist soon.
> 
> I notice you can get current cycle stats out of the pdev stats as well,
> and those update every time you ask firmware for stats.
> 
> It won't be 100% accurate because you don't know when firmware
> was off-channel or not, but I guess it will be better for me than
> nothing.  I certainly don't want to be scanning all the time,
> but grabbing firmware stats already happens when you get ethtool
> stats, so as long as I poll often enough to catch wraps, I think it
> will be good enough.
> 
> I guess to get really accurate values, one would have to hack the
> firmware to keep its own accumulated stats and properly deal with
> channel changes.
> 
> Thanks,
> Ben
> 


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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: YanBo <dreamfly281@gmail.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>,
	ath10k@lists.infradead.org,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: Fix survey information reporting
Date: Fri, 05 Jun 2015 13:18:45 -0700	[thread overview]
Message-ID: <55720425.2050604@candelatech.com> (raw)
In-Reply-To: <5571F70D.4020101@candelatech.com>

I think the wrapping might be even more weird that previously suspected.  Here is output from my
system.

It looks to me that when cycle count overflows, it right-shifts all of these
counters one bit.  Clever, I guess, but surely a pain in the ass to deal with!


while true; do cat /debug/ieee80211/wiphy0/ath10k/fw_stats|head -10|tail -4; date; echo;sleep 1; done
....
                TX frame count  131810463
                RX frame count 2326362883
                RX clear count 2542947851
                   Cycle count 4180338939
Fri Jun  5 13:13:48 PDT 2015

                TX frame count  134407497
                RX frame count 2374518035
                RX clear count 2595337341
                   Cycle count 4269010333
Fri Jun  5 13:13:49 PDT 2015

                TX frame count   69523007
                RX frame count 1229973316
                RX clear count 1344131636
                   Cycle count 2210412416
Fri Jun  5 13:13:50 PDT 2015

                TX frame count   72305753
                RX frame count 1280184579
                RX clear count 1398937635
                   Cycle count 2299234941
Fri Jun  5 13:13:51 PDT 2015

                TX frame count   75050021
                RX frame count 1330205664
                RX clear count 1453548082
                   Cycle count 2387901854
Fri Jun  5 13:13:52 PDT 2015


Thanks,
Ben


On 06/05/2015 12:22 PM, Ben Greear wrote:
> On 06/05/2015 12:10 PM, YanBo wrote:
>> On Fri, Jun 5, 2015 at 10:14 AM, Ben Greear <greearb@candelatech.com> wrote:
>>> I applied these and some other related patches to my hacked-upon 4.0.4, but
>>> I am seeing some inconsistencies between how ath10k and ath9k
>>> reports survey info.  I am using my CT firmware based on 10.1.
>>>
>>> ath9k reports ever-increasing counters for the channel time
>>> and busy time.
>>>
>>> With ath10k, it reports the same values until I do a scan
>>> again, and even then, it is not additive.
>>>
>>> First, should the value only update when we do a scan?
>>>
>>> And second, should ath10k report ever increasing totals
>>> to match ath9k behaviour?
>>>
>>
>> It should be match with ath9k, but the ath10k doesn't accumulate the
>> survey count at currently code,
>> I drafted a patch to fix this issue, will send to public mailist soon.
> 
> I notice you can get current cycle stats out of the pdev stats as well,
> and those update every time you ask firmware for stats.
> 
> It won't be 100% accurate because you don't know when firmware
> was off-channel or not, but I guess it will be better for me than
> nothing.  I certainly don't want to be scanning all the time,
> but grabbing firmware stats already happens when you get ethtool
> stats, so as long as I poll often enough to catch wraps, I think it
> will be good enough.
> 
> I guess to get really accurate values, one would have to hack the
> firmware to keep its own accumulated stats and properly deal with
> channel changes.
> 
> Thanks,
> Ben
> 


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


  reply	other threads:[~2015-06-05 20:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 12:30 [PATCH] ath10k: Fix survey information reporting Vasanthakumar Thiagarajan
2015-05-05 12:30 ` Vasanthakumar Thiagarajan
2015-05-22  8:16 ` Kalle Valo
2015-05-22  8:16   ` Kalle Valo
2015-06-05 17:14 ` Ben Greear
2015-06-05 17:14   ` Ben Greear
2015-06-05 19:10   ` YanBo
2015-06-05 19:10     ` YanBo
2015-06-05 19:22     ` Ben Greear
2015-06-05 19:22       ` Ben Greear
2015-06-05 20:18       ` Ben Greear [this message]
2015-06-05 20:18         ` Ben Greear
2015-06-05 21:00         ` YanBo
2015-06-05 21:00           ` YanBo
2015-06-05 21:20           ` Ben Greear
2015-06-05 21:20             ` Ben Greear
2015-06-05 21:39             ` YanBo
2015-06-05 21:39               ` YanBo
2015-06-05 20:58       ` YanBo
2015-06-05 20:58         ` YanBo

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=55720425.2050604@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=dreamfly281@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=vthiagar@qti.qualcomm.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 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.