Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3179672ybn; Fri, 27 Sep 2019 02:21:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzruzdcWO5baJ1fZbza/2ZBdbRdKXtLgKMrnu2n5b+9GHbxgMkqgzuocqjmlTpSNb919S+6 X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr3443945edb.103.1569576062771; Fri, 27 Sep 2019 02:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569576062; cv=none; d=google.com; s=arc-20160816; b=jkmmSOnseg76NSnS9fxZT50Lc5VbCEcG/DdolMymQ3hBqNnfiqbwckNwpW4ZJWvDtb aOEGBS9hjo1AX8+5/qopjE8ouxNeIuYwzXN0alO7KLNkEFxM1IVI6ASGYVJBjT6Rdwv1 hBkQJmhob/hogVkyLwaCA+E/NYFrYd82RJSyup3u/47GDNk42VlupGXdnyu6s0F56lnz uZmIPx+iYsLg5hiY5X0EWxqintTPKENK0uM+DwBSw36H52iwwWuefHMMFcz/lXL2mRXs GonQ+h56WNI2dJnT0NQlhNKqX5eq28F2U5tyCPPm9xSy0VvoU033+LcCw0uA8hTTul9J 1+2w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:to:subject:dkim-signature; bh=AAKlYzFsyVOj8+SLz02ouSkxJZ0E9WsZH9HIGP3Wok8=; b=LvgrmlIw+FAEMGENsf8otg0IMNqVbN2O+9bhKTwigKv++iDi5eu8esl/kPXuzeGQq3 eYD/ow2p0mih9gloFTYhcyDLPUjr+ByE/cAGCupgt+FjzvRj9hWmUBa96n6xskz1hfWS N7Zk/IAmdYSLLS2huviReFyoNA6oknP2I6fXJvTnxpnMHhXdZ1kZ/TiB1W9YkWCUqtgR wTYYI2wi7moCMT6QWcufNVh0ZbYjedwDzIDo+1KlrMCY89hVncvSnNN5S3+pGqv1UPJD FXOiZTj5MOxCb8jT3vA503kEb+lpaAHAnNXc9/BoQUUBj9Kr9BuBf0jfwBFCYRat8KYm Meiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=HvwbSdAr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si1105409edz.299.2019.09.27.02.20.32; Fri, 27 Sep 2019 02:21:02 -0700 (PDT) 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=fail header.i=@nbd.name header.s=20160729 header.b=HvwbSdAr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725992AbfI0JRf (ORCPT + 99 others); Fri, 27 Sep 2019 05:17:35 -0400 Received: from nbd.name ([46.4.11.11]:45156 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfI0JRe (ORCPT ); Fri, 27 Sep 2019 05:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AAKlYzFsyVOj8+SLz02ouSkxJZ0E9WsZH9HIGP3Wok8=; b=HvwbSdArA7XahFhz9S8PsnJiOH rl4hQtT+WfeBiaAAfDxr0/tCekizyopK40nmEJoAYgMNSxHYTvpobMvtiofsQYn6E4gyMN6UhHeDm sAfDeU31w8PG6fIIm1Qm8AhJXZNBwvgLRTZq2vR4kfFB+rd9ZptwHItWyi6X94fS9/wc=; Received: from p54ae9b80.dip0.t-ipconnect.de ([84.174.155.128] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iDmNZ-0007wH-1d; Fri, 27 Sep 2019 11:17:33 +0200 Subject: Re: [PATCH 10/15] mt76: mt76x02: track approximate tx airtime for airtime fairness and survey To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , linux-wireless@vger.kernel.org References: <20190926174732.42375-1-nbd@nbd.name> <20190926174732.42375-10-nbd@nbd.name> <871rw218ty.fsf@toke.dk> <2475938e-b82c-9924-f7db-f475ec2530b3@nbd.name> <87sgoiyw0p.fsf@toke.dk> <27bb95dd-1f0e-5862-3616-04452808e736@nbd.name> <87mueqyunz.fsf@toke.dk> From: Felix Fietkau Autocrypt: addr=nbd@nbd.name; prefer-encrypt=mutual; keydata= xsDiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy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bsWS4 Message-ID: <88a9f47b-143e-d266-d5d8-606bcb6365cc@nbd.name> Date: Fri, 27 Sep 2019 11:17:32 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <87mueqyunz.fsf@toke.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019-09-27 11:07, Toke Høiland-Jørgensen wrote: > Felix Fietkau writes: > >> On 2019-09-27 10:37, Toke Høiland-Jørgensen wrote: >>> Felix Fietkau writes: >>> >>>> On 2019-09-27 09:45, Toke Høiland-Jørgensen wrote: >>>>> Felix Fietkau writes: >>>>> >>>>>> Estimate by calculating duration for EWMA packet size + estimated A-MPDU >>>>>> length on tx status events >>>>> >>>>> Would it make sense to move some of this code into mac80211? If we're >>>>> going to do airtime estimation for queue limiting it may make sense to >>>>> use this instead of the simplistic estimate I used in my RFC patch? >>>> Sure. I mainly put it in the driver because I wanted to get it working, >>>> tested and merged first without having to wait for a mac80211-next -> >>>> wireless-drivers-next merge. >>> >>> Right, OK. So that means another patch set on top of this to move it >>> afterwards? Don't suppose you can be convinced to take care of that as >>> well? :) >> I could, but I don't know when I will have time for it, since my plate >> is pretty full at the moment. > > Heh, I was afraid you'd say that. That makes two of us; guess we'll see > who gets around to it first, then :) > > Is there anything in your new airtime.c that is mt76-specific apart from > the struct mt76_dev and struct mt76_rx_status parameters? No, I made it as generic as possible to make it easy to move to mac80211. mt76_rx_status mirrors ieee80211_rx_status very closely, and going from mt76_dev to ieee80211_hw is easy as well. - Felix