From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 889243B29D for ; Fri, 22 Nov 2019 07:56:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574427392; 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=KZZqFDWqvlMMFoRSYAezA8tSd4brzrxOsFXtDdI8/H8=; b=XgOMMetP+d9BHt49SaMfzxqwm+U8Z6J9zjw/R4ztuChYILdoD/I1zzgC49ezFfRZSKQ9Go zC4b72RszFivLDdp57Lq2CY3JGNRIBtTWx1OhuuPdbBMUmO43hNV2/2yepFDIyLpBf0SlO A8jso2u8+7NQHNDBCI+HHkKbErK2PlQ= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-351-s5O02rcxPlK9AgBRqGiBJg-1; Fri, 22 Nov 2019 07:56:29 -0500 Received: by mail-lf1-f72.google.com with SMTP id u5so1744213lfm.21 for ; Fri, 22 Nov 2019 04:56:28 -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=KZZqFDWqvlMMFoRSYAezA8tSd4brzrxOsFXtDdI8/H8=; b=AAGjrN5s8kl3nVs07LsEYuiGu97g1vHayCx5tElkiyHHuIXZlzRtOW4KMRbLmwTTiG pBwJtmiLicLD3cyL8VA6fa8i8nXD1Xz2vJTL/Jnp2kmgmXPaiIVO2HheJANObx+PyZho kGf2V5GY2sBndQl/5lekAlsWcCqyk777sxkRkUzziyxeQnGEjcE0Y6iT+leuOWraoU6H XM0kV1FcEd/g0inMsR1PVk2WO2tFm8hobA+ACaF9LYeKKFy6VQ6SJ23a0fE509OyqJPm lsCgs6E3urHnS24GJbUP+s7ZsSBhA9nNvtxgJIYLJdxnLXjYfGj6sqM2pRFlmuuAfRH2 DQig== X-Gm-Message-State: APjAAAXzynBpmcVZ4Aecl6W4unqn4o6J6tIr5ewTA/EO9Ps8h3+t8sqo r/8YePuODlBHCVTQ8c+GeRzfzC6W1lU/TAHTFKGzGFEutc3x+wfKm3GX+TJ8BLMsV5H1KinGV4T nTkoJpngDnrR6agym4G7BxXp9++fbpvDfpmY= X-Received: by 2002:ac2:5f0a:: with SMTP id 10mr11782718lfq.57.1574427387566; Fri, 22 Nov 2019 04:56:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyM+scGkITeEjkDI5ttlc4qaK8t9f3w2wOV392mxY0gkbSf8TGyCC6mRQejmCZhVHicohf2cA== X-Received: by 2002:ac2:5f0a:: with SMTP id 10mr11782702lfq.57.1574427387352; Fri, 22 Nov 2019 04:56:27 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id u4sm2924660ljj.87.2019.11.22.04.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 04:56:26 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 031A51800B9; Fri, 22 Nov 2019 13:56:25 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg , Kan Yan Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, nbd@nbd.name, yiboz@codeaurora.org, john@phrozen.org, lorenzo@kernel.org, rmanohar@codeaurora.org, kevinhayes@google.com In-Reply-To: <3e7bea0cc643714ec90978a7999022544a39b118.camel@sipsolutions.net> References: <20191119060610.76681-1-kyan@google.com> <20191119060610.76681-3-kyan@google.com> <3e7bea0cc643714ec90978a7999022544a39b118.camel@sipsolutions.net> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 22 Nov 2019 13:56:25 +0100 Message-ID: <87tv6w3w92.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: s5O02rcxPlK9AgBRqGiBJg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v11 2/4] mac80211: Import airtime calculation code from mt76 X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2019 12:56:32 -0000 Johannes Berg writes: > On Mon, 2019-11-18 at 22:06 -0800, Kan Yan wrote: >> From: Toke H=C3=B8iland-J=C3=B8rgensen >>=20 >> Felix recently added code to calculate airtime of packets to the mt76 >> driver. Import this into mac80211 so we can use it for airtime queue lim= it >> calculations. >>=20 >> The airtime.c file is copied verbatim from the mt76 driver, and adjusted= to >> be usable in mac80211. This involves: >>=20 >> - Switching to mac80211 data structures. >> - Adding support for 160 MHz channels and HE mode. >> - Moving the symbol and duration calculations around a bit to avoid >> rounding with the higher rates and longer symbol times used for HE rat= es. > > :) > > I'll apply this, I guess, Great! > but I do wonder to what extent it overlaps with > cfg80211_calculate_bitrate()? Well, one calculates bitrates while the other calculates airtime? ;) But yeah, I get what you mean. I think Felix went through quite some pains to structure this code to avoid divisions in the fast path. I guess that is the main blocker for cfg80211_calculate_bitrate() to be used instead (assuming we do want to consolidate them eventually). Not sure if that can be fixed easily though? -Toke