From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id DFAB63CB35 for ; Wed, 23 Oct 2019 11:43:15 -0400 (EDT) Received: by mail-lj1-x244.google.com with SMTP id a22so21636016ljd.0 for ; Wed, 23 Oct 2019 08:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Wf7cqgLpHpMCfHDTso2mEEg6iVGE1A3AlSMCK0EZOvI=; b=MeL78PzzFc4GWTGjttUER3eajJiHAfiXzG8G1Xek8riNLS0Akb3EyaIF8kCjplCBvC e8PdIOrGlpPr64UiYnljhSyeNwzpyq1+SmkBqsKNqfnIjx/7/WUm7V18gqSZfq6qXpjy HSSFn0i5dZw0hwcdKmrjoc8j36P/bg/LP5qNws123c15xYetsbls2kJVLs9fGDiHpzTp NTAbYCE9/adTig9wIUFJSciEu5YjcNmNc29oi5wz79zXLWWwMOEF2YCmKSle0etLBDjV RPybKBRkcQRNKCdFp6+vsH/DZ/Jg6//ynFzwearQSIDF3fO2sX+/o3KRHWOwcJvzxVXH 952A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Wf7cqgLpHpMCfHDTso2mEEg6iVGE1A3AlSMCK0EZOvI=; b=bjZnGFw77vM+JOllBzVK8ojU2eTRWJrFrqoafa322E/8enfix+PyTFCStmPPQDb+wL vNfuQYLNhWXrYyfZeDoZysIte1TyC2r8VOgFXa/N2FP1rSn/1OJ4LB/dgZv7wZG/szoy 2FurKjCRYXi8RPKCpm+wSMNj+8mupt1RRPEvG3LbiTnMaIk8S14aF+tViQ4qQvMBUMjV tmQpuw+Re6ne7XQkdj0Wpg70cJ5J6L5W8zDPt00uC53LUrkpNBZ12ZMfkjJ3GaugMhPU YIGFwr+fL6OBQUtBkZdcsm8NtpsBy/P/JC7oUPwuhs/gcWHXvSzlBw4nLhxN8H76ijSH LiDA== X-Gm-Message-State: APjAAAWTVty803cBoBVNb9BbA2C0IEiOpFqMRhN6HY8o5NTxGWC/fqfY kjp6ia7f0AQOlIaGbRimD9sXfgcwZj/rCpBjgAq+Hg== X-Google-Smtp-Source: APXvYqx3Qvv4PHdZrvwXrE+LY1lvoApw+SX5kuGkePq0Hg3y9W9edqODxW4WERwR4EtQWzHdvirS2CmRTMj3y2hm1yI= X-Received: by 2002:a05:651c:326:: with SMTP id b6mr7678893ljp.119.1571845394424; Wed, 23 Oct 2019 08:43:14 -0700 (PDT) MIME-Version: 1.0 References: <157148503415.2989444.7391437309981941226.stgit@toke.dk> <157148503865.2989444.7118792679603045723.stgit@toke.dk> <871rv5ovwr.fsf@toke.dk> <87tv7znact.fsf@toke.dk> <87lftbn60t.fsf@toke.dk> In-Reply-To: <87lftbn60t.fsf@toke.dk> From: Kan Yan Date: Wed, 23 Oct 2019 08:43:03 -0700 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Johannes Berg , linux-wireless@vger.kernel.org, Make-Wifi-fast , ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Rajkumar Manoharan , Kevin Hayes Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v4 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: Wed, 23 Oct 2019 15:43:16 -0000 > Aha! Turns out I was doing the sta lookup completely wrong in > ieee80211_report_used_skb(); so anything frames that were dropped and > went through there would not get its airtime subtracted correctly. Will > send a v6 with a fix :) Awesome, thanks! That looks very promising. The symptom I see with previous patch is the interface's pending airtime count looks fine, but the station's airtime get wrong, either due to airtime is credited to the wrong station or wrong AC. On Wed, Oct 23, 2019 at 2:52 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Toke H=C3=B8iland-J=C3=B8rgensen writes: > > > Kan Yan writes: > > > >>> >> + if (ieee80211_is_data_qos(hdr->frame_control)) { > >>> >> + qc =3D ieee80211_get_qos_ctl(hdr); > >>> >> + tid =3D qc[0] & 0xf; > >>> >> + ac =3D ieee80211_ac_from_tid(tid); > >>> >> + } else { > >>> >> + ac =3D IEEE80211_AC_BE; > >>> >> + } > >>> > > >>> > The tid/ac is incorrect either here or in __ieee80211_tx_status() w= hen > >>> > tested with ath10k. The ac is set to AC_BE with test done using BK > >>> > class traffic, hence the pending airtime get updated for the wrong > >>> > txq. > >>> > >>> Huh, well that won't do, obviously :) > >>> > >>> Any idea why it might be wrong? > >> > >> somehow ieee80211_is_data_qos() returns false. Besides, qos_control > >> field doesn't seems to be set in ieee80211_build_hdr(). > >> > >>> Hmm, I guess we could just get the ac using skb_get_queue_mapping(). > >>> I'll send an update with this fixed for you to try :) > >> Thanks for the quick update. It is getting much better, but > >> unfortunately the pending airtime accounting sometimes is still not > >> correct and cause txq stuck occasionally. > > > > OK, so that has to mean that there are packets getting dropped somewher= e > > without going through ieee80211_report_used_skb(). Assuming you're not > > hitting the underflow warnings, just seeing the counter not get back > > down to zero? > > > > Could you see if you can find out if ath10k does that anywhere? I'll go > > hunting in mac80211. > > > > Looking for calls to kfree_skb() or kfree_skb_list() should hopefully > > turn up something... > > Aha! Turns out I was doing the sta lookup completely wrong in > ieee80211_report_used_skb(); so anything frames that were dropped and > went through there would not get its airtime subtracted correctly. Will > send a v6 with a fix :) > > -Toke >