Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp663469ybl; Thu, 12 Dec 2019 02:56:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzQZpBmJkR4SE+4gYnEgimw9rlQHkLSROJlraOnHZSuz3xkcSD8ipWArYzgzDhx9YfGuUbF X-Received: by 2002:a9d:6d10:: with SMTP id o16mr7702924otp.28.1576148214903; Thu, 12 Dec 2019 02:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576148214; cv=none; d=google.com; s=arc-20160816; b=XqhbbuGpLkWzGG6jKsook4lTFNDSxCYEIo7+C5btRs1mgVfvIlMZ9FQtbEXlRyxrZS f1kYSaxj3h4rzIjL0dBAoAKkGwLJcL6MJfXm/672jPrzyyFbkFs84cVnX3CvpcFxzZM2 Fp0RC9c6cZdpTpmjK5pLKUEXjJ5c7atpecMKoFPDQYrJDPMNRsCGd1nI5zRG3fDRl03p AgWVsdMjmhV9UM0Pj7t3//cp8PtCt/d+5tATAlthhLm83tPqigmrkqtKqXO86a3PX9/G P02ZCiM68SonfOV1m3vd7BMBB/6ulOuEy0ioWkLQ8xnAynMnC5gEiuc3b2XaJFJlwwAH VOVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=tViCQG3lsrEoLFHJxHOiQKzVD2qVe3ldyRDKWpQIP6E=; b=bWeVeIvguDeSooAteUmg0uIGH3JjCHBos3Y18JFNLJC+we6XVRPj68E0EO9/0SgarG sn2M8ajOZ/6A2hZvFdY44GO7G7GV3uWpvvmwXKhKYEwARXC4QFaMip4SJ+L3RH2BNjMP M5eQIksGSGUKh07Yfl/9OsRVhx4DLUNcepMPiDhSmOdWrmU4dTGzkjhnIH5282/LJzom g1D8BTr1Ls1QLZi/7o6/NXekHM3rGxV1qHXi49u0Wa56sWax5GWYOej2w+feFqEKKMM8 Nivsr17Jw//9iyL6WRkVqjfjT56PJedoH4u8dKSQ0q9cMSuZko90WyFFa5lLxYWMXWf2 5UvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hbdl9RLK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d187si2896757oif.33.2019.12.12.02.56.42; Thu, 12 Dec 2019 02:56:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hbdl9RLK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728858AbfLLKz1 (ORCPT + 99 others); Thu, 12 Dec 2019 05:55:27 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28560 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728831AbfLLKz1 (ORCPT ); Thu, 12 Dec 2019 05:55:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576148125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tViCQG3lsrEoLFHJxHOiQKzVD2qVe3ldyRDKWpQIP6E=; b=Hbdl9RLKT1tnmLsW4VH95+R7tETzjynAnkGxAs9CUlwkzLETAcMoS55HX6je0aSWtJbu8x q8Fu2agwCUqw+c5f8mCILQ3GmzGv4Z3KFGsGiiJ8HAbkkL+iH8Oe1uTA6kcZTWYixHU8l0 +Lcwd0o+mlNGCvMeuGO5JzPRIVrzxSg= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-qw9rHIdcOte5MFiP5IW3Jw-1; Thu, 12 Dec 2019 05:55:25 -0500 X-MC-Unique: qw9rHIdcOte5MFiP5IW3Jw-1 Received: by mail-lf1-f69.google.com with SMTP id d7so489736lfk.9 for ; Thu, 12 Dec 2019 02:55:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=tViCQG3lsrEoLFHJxHOiQKzVD2qVe3ldyRDKWpQIP6E=; b=tBK+rAxEQl9cwiCsJtuIpfIi1R7DamlbQq95C/7D0n9rqFSo8On/my3KpozFk45hAT 83lqIVpN+k3tTpnqzpaI6OrJ197YWECs2JXnxpkTgo0VDF0+cwhp8mr1NjDaY2OgS+FF GigGmbqQN/2bFqMfAmd/Kct+QE9Gk0lz08tjfWKoRCXR//zf65omkYg6J7VtAoj4DUiB vg9pljnM5w+0rJoPXJyDH9wFToqlzAxOivG5yJTJg2wM9kRKu+8sCjGD0oAn7oNH02a6 +bpg4MvzMQCaPMszyjQEIASnaeZsVKgobhAQMUXmSHLaCrrjPwCzYK2OjvE5uqe+OHIo HcIA== X-Gm-Message-State: APjAAAWPnrBE8FeIxsCCR3dUkpt5yUyURA+zYodTR1kbsYZOVwE9S18r wysL7X7bVECzK9SLBtjY4z8X8K1CYY5RPZWkxv3n52FRii3QQ+tWUKLBJ6mnwirBO0N7toeLCU3 AZ+gDJ130IC4uynWTV+5ZPnoDG7M= X-Received: by 2002:ac2:5088:: with SMTP id f8mr5221541lfm.163.1576148122893; Thu, 12 Dec 2019 02:55:22 -0800 (PST) X-Received: by 2002:ac2:5088:: with SMTP id f8mr5221531lfm.163.1576148122650; Thu, 12 Dec 2019 02:55:22 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id u19sm2795521ljk.75.2019.12.12.02.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 02:55:21 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 77DC11819EA; Thu, 12 Dec 2019 11:55:19 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg , Jens Axboe , Emmanuel Grumbach , Luca Coelho Cc: "linux-wireless\@vger.kernel.org" , Networking Subject: Re: iwlwifi warnings in 5.5-rc1 In-Reply-To: <3ca2be96898e9d30c27b2411148d201318e413f2.camel@sipsolutions.net> References: <9727368004ceef03f72d259b0779c2cf401432e1.camel@sipsolutions.net> <878snjgs5l.fsf@toke.dk> <3420d73e667b01ec64bf0cc9da6232b41e862860.camel@sipsolutions.net> <875zingnzt.fsf@toke.dk> <87tv67ez9p.fsf@toke.dk> <3ca2be96898e9d30c27b2411148d201318e413f2.camel@sipsolutions.net> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 12 Dec 2019 11:55:19 +0100 Message-ID: <87v9qleru0.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Johannes Berg writes: > On Wed, 2019-12-11 at 15:02 +0100, Toke H=C3=B8iland-J=C3=B8rgensen 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 fra= me >> > enters, and then ... should it "trickle back down" as the generated= =20 >> > 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 ... >>=20 >> 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 was thinking about a scheme where we re-defined the value in the cb to be a "time per byte" value, that we could just multiply by the packet length; that would make it trivial to do partial reporting. Not sure it's quite workable in practice, though; it would be hard to avoid rounding errors, and there's also the additional headers when splitting a packet, so the lengths don't necessarily add up. >> I think reporting it on the first packet >> would be the safest if we had to choose.=20 > > 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? Yeah, I *think* it does... :) > 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. Hmm, yeah, was wondering how that works, actually. I assumed you send the whole thing to the hardware as one superpacket? But if so how do you get the completion events back? Or are you splitting it in the driver just before you send it to the hardware? >> > 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. >> >=20 >> > 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. >>=20 >> 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). Right, I see. Well I guess now that we're turning this on one driver at a time, we can ensure that the driver provides sufficiently accurate rate information as part of that. BTW, since we're discussing this in the context of iwlwifi: do you have any data as to how much benefit AQL would be for that? I.e., do the Intel devices tend to buffer a lot of data in hardware/firmware? >> > 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. >>=20 >> 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. Yup, this makes sense, and would be easy to integrate with Minstrel as well, I think. We already have ieee80211_sta_set_expected_throughput(), so maybe expanding that? It just provides a single number now, but we could change it to set the full rate info instead? -Toke