ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Hari Chandrakanthan <quic_haric@quicinc.com>,
	Jeff Johnson <quic_jjohnson@quicinc.com>,
	ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 1/2] wifi: cfg80211/mac80211: Add support to rx retry stats
Date: Thu, 28 Mar 2024 11:48:38 -0700	[thread overview]
Message-ID: <b890c308-5d66-d9cc-ebff-17e8554f9a69@candelatech.com> (raw)
In-Reply-To: <3f6de100163a8521ab09929abc537e57d26dafea.camel@sipsolutions.net>

On 3/28/24 10:54, Johannes Berg wrote:
> On Thu, 2024-03-28 at 22:49 +0530, Hari Chandrakanthan wrote:
>> On 3/27/2024 8:37 PM, Johannes Berg wrote:
>>> On Wed, 2024-03-27 at 08:02 -0700, Jeff Johnson wrote:
>>>>> I'm also imagining that we change the API from cfg80211 to the drivers
>>>>> to get the *link* STA information, and do the summing up and/or "best"
>>>>> selection there in cfg80211 itself. However, I am prepared to accept the
>>>>> possibility that we may do _both_ in the API, if not all drivers can
>>>>> even do all of the statistics per link. We should probably still have
>>>>> the link STAs in the statistics in nl80211, but then they may not be
>>>>> populated?
>>>> First remember that there are a lot of statistics, and each driver is free to
>>>> return as many or as few as they support, indicating the ones they are
>>>> returning using the "filled" bitmap.
>>> Yes, I'd think we want to use the same data structure for both, though
>>> setting something in *both* links and *mld* would (should) be an error.
>> The statistics can be populated by driver or mac80211.(say tx retries,
>> tx packets etc)
> 
> Right.
> 
>> So we should also change the existing stats update in mac80211 on link
>> STA basis instead of deflink?
> 
> Absolutely, we need to do that, it's been on my list forever, since the
> early MLO work... I'm a bit torn between not wanting you to have to do
> all that work (even if we know that we'll have to do it) and on the
> other hand not wanting to make it worse with more statistics now ...
> There's no good middle ground here though now.
> 
>>> Good point, when they're really removed we'd want to probably keep that
>>> value as a bias for the MLD-level stats?
>>
>> ok. Then the statistics value in MLD STA would be bias + summed up value
>> of currently alive links?
> 
> I guess? But I'm not sure where we'd actually _keep_ the bias values.
> Maybe give up on that idea that cfg80211 could sum it all up, and just
> require the underlying driver (or mac80211) to report both per-link and
> total stats, where available? That way, mac80211 could keep the bias
> somewhere and just add it to the total before reporting _that_.
> 
>> On the same line , ethtool stats(*interface level stats*) in
>> mac80211(ieee80211_get_stats())
>> computes the stats by summing up the current STA statistics.
>> Here stations can come and go and the ethtool stats may not reflect the
>> total packets transmitted or received by the interface.
>> It just reflects the summed up value of current alive stations.
> 
> Yeah ... I know Ben loves it, but personally I kind of think of ethtool
> as a dead legacy interface for this respect, it just doesn't have the
> ability to reflect the required structures/hierarchy/etc. well since
> it's just a flat list. Sure you can structure the names in some way, but
> it's iffy at best. I'd just ignore that for now. If we have better
> statistics to nl80211, we can always make ethtool support on top of
> that, perhaps even moving it to cfg80211, if we even need more support
> there. I'm not hugely in favour, but if it stays contained somewhere and
> consumes existing APIs I'm OK with it.

I have my own hacks to make ethtool be minimally useful for MLO,
but I think it can be revisited later once the over-all MLO
architecture is solidified.

As Hari says, even without MLO, the AP's ethtool stats are not well
defined (it works better for STA vdevs).  Something that can also be fixed later after MLO calms down,
but my initial thought is to keep per-vdev counters that accumulate
any per-station counters and then the ethtool logic would not
try to sum the current stations but rather just grab the accumulated stats.

Thanks,
Ben

> 
>> Since these two problems are similar (ethtool stats and MLD stats
>> calculation),
>> would like to understand what type of value would be more useful to user?
>>
> 
> What do you mean by that?
> 
> johannes
> 

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




  reply	other threads:[~2024-03-28 18:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 13:45 [PATCH v2 0/2] wifi: cfg80211/ath12k: Add support to rx retry stats Hari Chandrakanthan
2024-03-19 13:45 ` [PATCH v2 1/2] wifi: cfg80211/mac80211: " Hari Chandrakanthan
2024-03-21 20:26   ` Jeff Johnson
2024-03-25 15:43   ` Johannes Berg
2024-03-27 10:09     ` Hari Chandrakanthan
2024-03-27 10:32       ` Johannes Berg
2024-03-27 15:02         ` Jeff Johnson
2024-03-27 15:07           ` Johannes Berg
2024-03-28 17:19             ` Hari Chandrakanthan
2024-03-28 17:54               ` Johannes Berg
2024-03-28 18:48                 ` Ben Greear [this message]
2024-03-19 13:45 ` [PATCH v2 2/2] wifi: ath12k: " Hari Chandrakanthan
2024-03-21 20:29   ` Jeff Johnson
2024-03-21 20:24 ` [PATCH v2 0/2] wifi: cfg80211/ath12k: " Jeff Johnson

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=b890c308-5d66-d9cc-ebff-17e8554f9a69@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath11k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_haric@quicinc.com \
    --cc=quic_jjohnson@quicinc.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 read-only IMAP folder(s) and NNTP newsgroup(s).