From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id B3A7C3B29E for ; Thu, 17 Oct 2019 06:24:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571307871; 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=lcgTAsykrrNBZTJbyqExhJnM6yJEQufUqHJ8rZTQa9o=; b=GwWuzhf7dXo0kLvtzPnMHOu+F8TijbnNr/rrChPmYqemNpI2FwXAUcvT0kHkClTZdEwv1X grcaNvNmt1gWPjUDjhSwudPqEY5IBI9iLCYFf89RWOU/EMQQaUcb40FbzMkKlxngjFGiGP 7ZKorCROxcvWys8uU0sR0WR4NaIkjhw= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-ku8pk3ehPIiDVXc4JI5sTA-1; Thu, 17 Oct 2019 06:24:29 -0400 Received: by mail-lf1-f70.google.com with SMTP id m16so421818lfb.1 for ; Thu, 17 Oct 2019 03:24:29 -0700 (PDT) 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=lcgTAsykrrNBZTJbyqExhJnM6yJEQufUqHJ8rZTQa9o=; b=hxb4tMcWZ2a2GwR7zA9J4cwAk7nQXhK2bfEWodYgwHAj9KgKq4PmfT3Dd3ZrkBgsln //IxHW1D7E6ZXyw7dkZ95KZdVE4MMXT+FTklELLHaEOrOLfmlxil2JjDcbIPxFSKgE6R 44hWzHPRpqxfxi79ob0+As9CJPvw3YA+nMsf7yis88GoxYrBU+770wq6WYKOT/rieBT8 Fr+8q5CMDa7HrzGCnQZsB/TxOsRkr7J+L6AD/M6kSmMKg55FvzONVcjKziygletxNeYs Lbuupw/wz/ftZugQk6a8Ky5NTUcQL9xunzYV4gLzMwT+VbigTY4V+mK0JB598VDxH6yE YkAw== X-Gm-Message-State: APjAAAVRC3wXfVQOcbvS1D948HkEpHTfH9rSdQVoIUIw0AtKsCHum6DZ c7s/vqLzEH8SPC1lT50oLh6bmIqKE+hMTrru4wAu8QTNLVTQF9jP52ncWWFeWXhAkTkXVn61oj1 +2xaMGWAkccBw/3DRjU/Gxa5MD+wF8/RE9DA= X-Received: by 2002:ac2:495c:: with SMTP id o28mr1930778lfi.114.1571307868182; Thu, 17 Oct 2019 03:24:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4Um9PtHf45hF1sDU6N7En5Zg6AyOeucAQgAhGOFjb+fQT27D52C4f7YvAByVqn4imrAvxGw== X-Received: by 2002:ac2:495c:: with SMTP id o28mr1930764lfi.114.1571307867946; Thu, 17 Oct 2019 03:24:27 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id v203sm1119453lfa.25.2019.10.17.03.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 03:24:27 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id A575A1804C9; Thu, 17 Oct 2019 12:24:26 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Sebastian Moeller 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 In-Reply-To: <751EA059-654B-4E06-A3D6-C727FE1FCE98@gmx.de> References: <157115993755.2500430.12214017471129215800.stgit@toke.dk> <157115994190.2500430.14955682016008497593.stgit@toke.dk> <87o8yfg0zo.fsf@toke.dk> <751EA059-654B-4E06-A3D6-C727FE1FCE98@gmx.de> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 17 Oct 2019 12:24:26 +0200 Message-ID: <87lftjfz51.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: ku8pk3ehPIiDVXc4JI5sTA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v2 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue 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: Thu, 17 Oct 2019 10:24:31 -0000 Sebastian Moeller writes: >> 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? Well, yeah, as long as we're sending Ethernet packets. Which is kinda baked into the WiFi standard :) -Toke