Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp761909ybg; Fri, 18 Oct 2019 07:04:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqylKmFgNWS+bB1hFTUPtQHiMjEgDx+ZJI3I5eLb/1kTpZhs+M7Qtl/EWJPogn+3+IWoJWlm X-Received: by 2002:a05:6402:895:: with SMTP id e21mr9622860edy.72.1571407452726; Fri, 18 Oct 2019 07:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571407452; cv=none; d=google.com; s=arc-20160816; b=TGLpTTxbROq718rs1EzDfBNCp0iOZcST30MzcrpHJ/CX2bDlHuDgPp5tCrYiZqKT4J NKJf/GWyUHBWX2AQDrJm1G76Zqs2EAN9zMc6RlDBsY1bDV27ivXlCYNkWkrfNUHGbwVu 9dtuA0h4kaaK9tvsEatxPhN+zyDs1F//AkkFqlsD2H3FFznNXwaV23H6SfVnpLateRcw 8RNqOFG9HrOLTk/Vo+mORDtyOm7z6nmoL1wxNVwSpySu+JOh6jEWiGxPDEJcsZNSoGTB UsF7p4yye2t7VX7csz1i+cpOHQBsSEZq7qZwqxepqNTJlD4GFmFsW99Te91ks1yR+iig 3zfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=dlK12p2I4Xqa+K/lpf5bvLFL5YEzSUtCK4Dum4ZZmUI=; b=QYb7VyCdjY8VaqdaQJRF95t9zgaBvJSQ/AZp9iPk+3M9iYBATaTPb1oiGaPfw4FoZK eM1Y2hLIiiJu59eIpX8RNwOyYTit6HHl70rWk4JHHfiXdNzwBSvERkrzTNVozWyGaTK7 AAzaLXLnNZfdpEaegslf0x0IMoDIv1qmLMl1w0HCBy4E9Lz6O2EibIauuX+qp2aYbESG 8BKZnzyeGe9sTLcafYPglz2BXOSZKgmI1FLLe5JUPhOPOkFNObZ2eixfVh9HBWa4jBYR 6G5H7cMbl8c2lB5z1skp0thqxM2E23tP3Z+VXvRxRy7ycikfEfW8dT12L0tIFPCvKMC6 HgxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=LgB3dpGw; 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 i27si3435243ejg.249.2019.10.18.07.03.23; Fri, 18 Oct 2019 07:04:12 -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=pass header.i=@gmx.net header.s=badeba3b8450 header.b=LgB3dpGw; 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 S2439549AbfJQJ6H (ORCPT + 99 others); Thu, 17 Oct 2019 05:58:07 -0400 Received: from mout.gmx.net ([212.227.17.20]:44817 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393881AbfJQJ6H (ORCPT ); Thu, 17 Oct 2019 05:58:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1571306259; bh=r0X83n+I3P0JzGYWN7EBmaDwAvoICtNlno+n3xjeVXg=; h=X-UI-Sender-Class:Subject:From:In-Reply-To:Date:Cc:References:To; b=LgB3dpGwIrXUfgBGMNqpjZLP3uIDAeevzUNUv05Hhp4yZDEaxLbbu52nXUbccve18 UYH9uoTEXbVdc1/Q3wF5s3MNWRyVl97WTaiWSBMd9/HMCXRpPOxqKNBpkLlUjEhPLz tmoiZKyX9P3gHLtlYrpw5gIvKG4inW1FtgEuNncY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.11.12.33] ([134.76.241.253]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MsYux-1i2GGe2OQl-00u5E0; Thu, 17 Oct 2019 11:57:39 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [Make-wifi-fast] [PATCH v2 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue From: Sebastian Moeller In-Reply-To: <87o8yfg0zo.fsf@toke.dk> Date: Thu, 17 Oct 2019 11:57:36 +0200 Cc: Kan Yan , Rajkumar Manoharan , Kevin Hayes , make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, John Crispin , Johannes Berg , Lorenzo Bianconi , Felix Fietkau Content-Transfer-Encoding: quoted-printable Message-Id: <751EA059-654B-4E06-A3D6-C727FE1FCE98@gmx.de> References: <157115993755.2500430.12214017471129215800.stgit@toke.dk> <157115994190.2500430.14955682016008497593.stgit@toke.dk> <87o8yfg0zo.fsf@toke.dk> To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Mailer: Apple Mail (2.3445.104.11) X-Provags-ID: V03:K1:aPvGsXTJoLp79eXyZQgtYx6V2rsHlhkZQUXEDzqSfnRUsXX1voi 4fXbxehMwFhlhEakCcT4//VKTg79SzVmZjJNVswMa5fBK7cq8AYOROHKe/YTtC+Z3tcXyxS L+VwaJbaC5rhQ8LNvzRu2jLOW6hkIpc+bwn7RfnzRnI0NpAjw6Q3aXYHPD/aycmLCcjmG4K I4yXHqC7YDNPv9/7yQcog== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Qnl/WNGe1/A=:6veXLPY1zNodt9uhjHOkQV BTS7PlO6ZuDJ9SyKve4tWCAlNtmHgAbReCu5Slb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p3ayRtTiezn1IZKBu6NAxHYYQWoGJIYCAqZ424ofgk/njwx+e jjMsIdHkfZVfab9LhaHZxm0Wugf9odTEokXDF2RH1sMn3UtMDj6QHzuyTJ9kzgIZx5NExL9rw GqlRcGcZl8zuBWoBDwPnEqiWzOZrV+dk3Lm0Ol4fHpu6ZWEfbt45DLrEfmCA= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > On Oct 17, 2019, at 11:44, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >=20 > Kan Yan writes: >=20 >> Hi Toke, >>=20 >> Thanks for getting this done! I will give it a try in the next few >> days. A few comments: >>=20 >>> The estimated airtime for each skb is stored in the tx_info, so we = can >>> subtract the same amount from the running total when the skb is = freed or >>> recycled. >>=20 >> Looks like ath10k driver zero out the info->status before calling >> ieee80211_tx_status(...): >> int ath10k_txrx_tx_unref(struct ath10k_htt *htt, >> const struct htt_tx_done *tx_done) >> { >> ... >> info =3D IEEE80211_SKB_CB(msdu); >> memset(&info->status, 0, sizeof(info->status)); >> ... >> ieee80211_tx_status(htt->ar->hw, msdu); >> } >=20 > Ah, bugger; I was afraid we'd run into this. A quick grep indicates = that > it's only ath10k and iwl that do this, though, so it's probably > manageable to just fix this. I think the simplest solution is just to > restore the field after clearing, no? >=20 >> We need either restore the info->status.tx_time_est or calling >> ieee80211_sta_update_pending_airtime() in ath10k before tx_time_est >> get erased. >>=20 >>> + if (local->airtime_flags & AIRTIME_USE_AQL) { >>> + airtime =3D ieee80211_calc_expected_tx_airtime(hw, = vif, txq->sta, >>> + = skb->len + 38); >>=20 >> I think it is better to put the "+ 38" that takes care of the header >> overhead inside ieee80211_calc_expected_tx_airtime(). >=20 > Hmm, no strong opinion about this; but yeah, since we have a dedicated > function for this use I guess there's no harm in adding it there :) >=20 Silly question, is this Overhead guaranteed to be 38 Bytes for all = eternity? Otherwise a variable or a preprocessor constant might be more = future proof? Best Regards Sebastian > -Toke >=20 > _______________________________________________ > Make-wifi-fast mailing list > Make-wifi-fast@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/make-wifi-fast