From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5616C43603 for ; Wed, 11 Dec 2019 21:17:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5FD021556 for ; Wed, 11 Dec 2019 21:17:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfLKVRl (ORCPT ); Wed, 11 Dec 2019 16:17:41 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:41110 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfLKVRl (ORCPT ); Wed, 11 Dec 2019 16:17:41 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.3) (envelope-from ) id 1if9MT-0055JU-VA; Wed, 11 Dec 2019 22:17:34 +0100 Message-ID: <3ca2be96898e9d30c27b2411148d201318e413f2.camel@sipsolutions.net> Subject: Re: iwlwifi warnings in 5.5-rc1 From: Johannes Berg To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , Jens Axboe , Emmanuel Grumbach , Luca Coelho Cc: "linux-wireless@vger.kernel.org" , Networking Date: Wed, 11 Dec 2019 22:17:30 +0100 In-Reply-To: <87tv67ez9p.fsf@toke.dk> References: <9727368004ceef03f72d259b0779c2cf401432e1.camel@sipsolutions.net> <878snjgs5l.fsf@toke.dk> <3420d73e667b01ec64bf0cc9da6232b41e862860.camel@sipsolutions.net> <875zingnzt.fsf@toke.dk> <87tv67ez9p.fsf@toke.dk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 2019-12-11 at 15:02 +0100, Toke Høiland-Jørgensen wrote: > > 2) GSO/TSO like what we have - it's not really clear how to handle it. > > The airtime estimate will shoot *way* up (64kB frame) once that frame > > enters, and then ... should it "trickle back down" as the generated > > parts are transmitted? But then the driver needs to split up the > > airtime estimate? Or should it just go back down entirely? On the > > first frame? That might overshoot. On the last frame? Opposite > > problem ... > > Well, ideally it would be divided out over the component packets; but > yeah, who is going to do that? I'm not even sure we *can* do this easily - do we know up-front how many packets this will expand to? We should know, but it might not be so easy given the abstraction layers. We could guess and if it's wrong just set it to 0 on any remaining ones. > I think reporting it on the first packet > would be the safest if we had to choose. Agree. > Also, ideally we would want the > GSO/TSO mechanism to lower the size of the superpackets at lower rates > (does it?). At higher rates this matters less... Well TCP does limit (pacing shift) the amount of outstanding data, so if it's _really_ slow I guess it will also limit the size of the superpackets? It's really just an artifact of our software implementation that we report the SKBs back as used with partial content. Maybe we shouldn't even do that, since they weren't generated by mac80211 in the first place, and only report the original skb or something. > > 3) I'm not quite convinced that all drivers report the TX rate > > completely correctly in the status, some don't even use this path > > but the ieee80211_tx_status_ext() which doesn't update the rate. > > > > 4) Probably most importantly, this is completely broken with HE because > > there's currently no way to report HE rates in the TX status at all! > > I just worked around that in our driver for 'iw' reporting purposes > > by implementing the rate reporting in the sta_statistics callback, > > but that data won't be used by the airtime estimates. > > Hmm, yeah, both of those are good points. I guess I just kinda assumed > that the drivers were already doing the right thing there... :) I'm not really sure I want to rely on this - this was never really needed *functionally*, just from a *statistics* point of view (e.g. "iw link" or such). > > Now, (1) probably doesn't matter, the estimates don't need to be that > > accurate. (2) I'm not sure how to solve; (3) and (4) could both be > > solved by having some mechanism of the rate scaling to tell us what the > > current rate is whenever it updates, rather than relying on the > > last_rate. Really we should do that much more, and even phase out > > last_rate entirely, it's a stupid concept. > > Yes, that last bit would be good! We already partially have this, we have a 'get best rate' or so callback in the rate scaling, we'd just have to extend it to the driver ops for offloaded rate scaling. Ideally, it'd be a function call from the rate scaling to mac80211 so we don't have to call a function every time we need the value, but the rate scaling just calls us whenever it updates. This would even work with iwlwifi's offloaded algorithm - it notifies the host on all changes. > > There's an additional wrinkle here - what about HE scheduled mode, where > > the AP decided when and at what rate you're allowed to send? We don't > > report that at all, not even as part of rate scaling, since rate scaling > > only affects *our* decision, not when we send as a response to a trigger > > frame. This is _still_ relevant for AQL, but there we can only see what > > the AP used last (**), but we don't track that now nor do we track the > > proportion of packets that we sent triggered vs. normal medium > > access... > > Huh, wasn't aware that was a thing in HE; that's cool! And yeah, could > have interesting interactions with AQL... Yeah ... johannes