From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.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 B13653B2A4 for ; Fri, 18 Oct 2019 10:40:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571409627; 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; bh=4jQ/tW2DJnux5IJz+rjWj2biWuzQKo2eWZ9vfDg1dJM=; b=W7ETN9RxBztbtwowwWd8xynuuKNFVjbzXDh7dx32zFQSjjaOn+qFTmma3O9zeU9QSpseOq zqjxE4yliJR88nbAZAJj46gIvg32IZdc5Ebg0XJgkP+XafG0y/U0xyZwR5rxmxQluTBC/K t8BqO0+bQNSVVirhhkGqcOwFbztE0u8= 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-145-A-mfucuAMTeJBDuoPOY0Qw-1; Fri, 18 Oct 2019 10:40:24 -0400 Received: by mail-lf1-f69.google.com with SMTP id m24so1317447lfh.22 for ; Fri, 18 Oct 2019 07:40:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=e7FaDhgC1zTkjFC0jsJQQgggehot9KAb85p12pfkR44=; b=GfPoKbhmu08cvv6OawECmauE4BlzTKJ+yfMYB7/Q7exwhzwu8SfTaZM+Pcrf3XgPcg PCVlfWp2DFRTcSfHyJ8pmzd/i6sXjYTI/faP1RFGn7iMvf5WEVnIIgRZitDKYbu7caPe Gi9E+n4rDanEuSKygciDsnkSFy0XVRLwhqz72SF7s+9eR4zcUps6LiM1A9+/v6Qg93gp 48dQkFY5A2fv+3BNZXsEwMQ1IU23cQUmpKQcGfkVhGmeqQGxIDE7pzxOgyYxP5QSSiOW zN43gZ73Uxf/XeYzBmV0/LjtY+CX5Aucsewc8/ZvQYoJDMtRfVW73CSupg2ki55aqEG6 2NDA== X-Gm-Message-State: APjAAAV/7D0IVV37+upaH6Zk0nbDMWbPxBYSrDIvpcBP/qfOe6We9+aZ SYQEuYXtv0MS4izse6OvOTuPVOPqgI9ds1XcUkLpyqgiNv48u+pMcOJcs/wItI9QoHJsNqmEQMz aHMT4BCDuxANhlu2NPwisnmCPBC6ZJh5pV+Q= X-Received: by 2002:ac2:50c4:: with SMTP id h4mr5868991lfm.15.1571409623104; Fri, 18 Oct 2019 07:40:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1oW0Pilzv/j0cmg+z4cw3p8bFy2vRDcI9r/1HPABPVkHKj9AY00UN3Q8sVxFdt9bvMFmBOQ== X-Received: by 2002:ac2:50c4:: with SMTP id h4mr5868984lfm.15.1571409622930; Fri, 18 Oct 2019 07:40:22 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a00:7660:6da:443::2]) by smtp.gmail.com with ESMTPSA id u26sm2688629lfd.19.2019.10.18.07.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 07:40:21 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 0EDCF1804B6; Fri, 18 Oct 2019 16:40:21 +0200 (CEST) From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Kan Yan , Rajkumar Manoharan , Kevin Hayes Date: Fri, 18 Oct 2019 16:40:21 +0200 Message-ID: <157140962094.2866668.3383184317264069493.stgit@toke.dk> User-Agent: StGit/0.20 MIME-Version: 1.0 X-MC-Unique: A-mfucuAMTeJBDuoPOY0Qw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Make-wifi-fast] [PATCH v3 0/4] Add Airtime Queue Limits (AQL) to mac80211 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, 18 Oct 2019 14:40:28 -0000 This series is a first attempt at porting the Airtime Queue Limits concept = from the out-of-tree ath10k implementation[0] to mac80211. This version takes Ka= n's patch to do the throttling in mac80211, and replaces the driver API with th= e mechanism from the previous version of my series, which instead calculated = the expected airtime at dequeue time inside mac80211, storing it in the SKB cb field. This series also imports Felix' airtime calculation code from mt76 into mac80211, adjusting the API so it can be used from TX dequeue, by extractin= g the latest TX rate from the tx_stats structure kept for each station. As before, I've only compile tested this (lacking the proper hardware to do= more testing). So I'm hoping someone with a proper testing setup can take the wh= ole thing for a spin... :) The series is also available in my git repo here: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/log/?h=3Dmac= 80211-aql-02 Changelog: v3: - Move the tx_time_est field so it's shared with ack_frame_id, and use un= its of 4us for the value stored in it. - Move the addition of the Ethernet header size into ieee80211_calc_expec= ted_tx_airtime() v2: - Integrate Kan's approach to airtime throttling. - Hopefully fix the cb struct alignment on big-endian architectures. --- Kan Yan (1): mac80211: Implement Airtime-based Queue Limit (AQL) Toke H=C3=B8iland-J=C3=B8rgensen (3): mac80211: Shrink the size of ack_frame_id to make room for tx_time_es= t mac80211: Import airtime calculation code from mt76 mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue include/net/cfg80211.h | 7 + include/net/mac80211.h | 30 +++- net/mac80211/Makefile | 3=20 net/mac80211/airtime.c | 377 ++++++++++++++++++++++++++++++++++++++++= ++++ net/mac80211/cfg.c | 2=20 net/mac80211/debugfs.c | 78 +++++++++ net/mac80211/debugfs_sta.c | 43 ++++- net/mac80211/ieee80211_i.h | 8 + net/mac80211/main.c | 9 + net/mac80211/sta_info.c | 32 ++++ net/mac80211/sta_info.h | 8 + net/mac80211/status.c | 38 ++++ net/mac80211/tx.c | 67 +++++++- 13 files changed, 684 insertions(+), 18 deletions(-) create mode 100644 net/mac80211/airtime.c