Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Per MLO link TX stats
Date: Tue, 27 Aug 2024 18:20:18 +0200	[thread overview]
Message-ID: <9093726e308d0a26e8afe2323a865d222e48fe61.camel@sipsolutions.net> (raw)
In-Reply-To: <e5c3265a-3411-39b4-f4c4-40f3937c96fb@candelatech.com>

On Tue, 2024-08-27 at 09:12 -0700, Ben Greear wrote:
> 
> When be200 goes into eMLSR mode, both 5 and 6Ghz links are shown as active, so at least
> you cannot use 'active link' to reliably update stats.

Sure, not active link - but there's an LMAC bit somewhere ... Ah, it's
not documented, it's actually documented *differently*, but it should be
bit 31 in len_n_flags in struct iwl_rx_packet.

Given the LMAC ID on the TX response notification we should know which
LMAC transmitted it, and then I think it's a simple mapping to the
active link. But I haven't actually really tried it.

> > > In the case where there is a single active link, then I can hack something together
> > > that should be at least mostly right, but that won't fix any future radio that can
> > > do 2+ active links.
> > > 
> > > Any suggestions for best path forward on this?
> > 
> > I really think we also need to do some work on the API/cfg80211 level,
> > and have link station statistics in cfg80211 instead of full station,
> > and then combine them to (older) userspace in cfg80211, i.e. if
> > userspace doesn't request broken out per-link statistics. There's
> > probably a bunch of work here, and I only have a vague idea of how it
> > should be done...
> 
> I think first step is to get the driver(s) able to report the link-id in
> the tx-status.  After that, mac80211 can gather the stats.  

Yeah, that makes sense, at least partially that's needed. I suspect that
also we need to extend the API down to the sta_statistics call though to
return per-link statistics, e.g. the TX bitrate would seem should be
reported per link, and that's done through that call now I believe.

> I hacked
> tx/rx link stats into mac80211 ethtool (for first 3 links), but it is still not reliable since
> mac80211 doesn't know the actual tx link id.

Right.

> After that, then certainly I'd be happy to have per-link stats available,
> and combining them in cfg80211 seems like a fine idea as well.  Some things
> that don't combine well (rssi, link rates, etc) would take a bit of kludging
> if trying to provide a single 'sta' view of stats.

True, some can't just be added up and we'd have to find a sane different
"best" view, perhaps for rates it'd be the better of the two or the sum
if only reporting the bitrate, or better of the RSSI, etc. Case by case,
I guess.

johannes

  reply	other threads:[~2024-08-27 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 17:52 Per MLO link TX stats Ben Greear
2024-08-27 15:56 ` Johannes Berg
2024-08-27 16:12   ` Ben Greear
2024-08-27 16:20     ` Johannes Berg [this message]
2024-08-27 16:28       ` Ben Greear
2024-08-27 16:41         ` Johannes Berg
2024-08-27 18:17           ` Ben Greear
2024-08-28 12:50             ` Johannes Berg

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=9093726e308d0a26e8afe2323a865d222e48fe61.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox