Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp421996ybg; Tue, 22 Oct 2019 23:43:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKajzq+VkCIkxYy+RqNtfGTi48rOo8rn+7Bmb0wRZuBMbtZ/BNjQ0z51FlNcBnFJ2Imv3M X-Received: by 2002:a50:9eac:: with SMTP id a41mr35663841edf.237.1571813012532; Tue, 22 Oct 2019 23:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571813012; cv=none; d=google.com; s=arc-20160816; b=BKBRoCkwSveE/gBGksEQX+JIdnSTJ4HdN4XGxMRqZ7vdY7YY2sniRvVCMmhIcgHGhK hjwJZv1SkHRrRFwmUfg5iscQ/NmvjqBkST/t3fB/ym7S4VnMGpEMdEaks7mqKr5AHrm0 tx2Zpi+8+sdwbbjwjTtO80hGgT20esaluSljft6TgQ6lovYXEp53m7ZzZL0wPVLi1Cov uV739jzNe1MkJE2wOdUB2fE+HchfDAqaZbI+cLepUyjuTQfhFccLNTjNjPP4UbQoYa08 yRs9XV2dxAaLxXN32UbxuTepAQvvFyQiMVdGb2IcbZsjhcfhRdWGCvEJJEsxt0YYYAk7 9X6w== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xLzPgNOZ8X14gfCEvYWsxDF01OFUZfoQjcWDyuoGltc=; b=hVMxK1lxE6+DnxFRG6/QpW8Q/NDC8OEg1oVg+FGD543/sFDCIqbrg3q6/lcb/UmIAD pKV0Ty+q4+yMW860ohcHtKeuV9/7oWOrYSLcaqHU3QUYxtNeNq3AUZIwKFIzShPZMR37 yacZasnR512DgF9JobsA+FOZXuTyGyea9lf7u+46wW9N0xscfcqBh6TDRxy6Ok7u13zy KWR4cOrTmJB0E/96Y5BgyVrVGq2X1ToeAhir9dYYc2oYQt2CvzjkcXbLGRJsBpJPiiHI MzgvxTNYOrTag1OgGgTfFMFvUphcFxAq6Nxz69Owu64LXYU8lIOyzBjjDSgnS0j6i8XJ jT7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LJWHaiQc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si13084941edo.14.2019.10.22.23.42.58; Tue, 22 Oct 2019 23:43:32 -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=@google.com header.s=20161025 header.b=LJWHaiQc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387662AbfJWGmB (ORCPT + 99 others); Wed, 23 Oct 2019 02:42:01 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45226 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732574AbfJWGmA (ORCPT ); Wed, 23 Oct 2019 02:42:00 -0400 Received: by mail-lj1-f195.google.com with SMTP id q64so19772945ljb.12 for ; Tue, 22 Oct 2019 23:41:59 -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=xLzPgNOZ8X14gfCEvYWsxDF01OFUZfoQjcWDyuoGltc=; b=LJWHaiQc/q6Hg9z63NPV0MjMzWfOhKO0ey++fb4OkDyjZxD45pVUtUWBaO1/A2Qw2d RJd7oMRFkK9acDzP60fuBo6rXfXFDBhRQNsaSsYvkYETY+Y//R9nqZUBljNNONlm2JRJ fA/4lfnnSbauy8m0CvVAUs+97DA1Lf3yvlh2Ek0wox9gA1zBdoGbHsm6eJ5bUAmzQbNq +CZzAgGbM6Pffjp8WhndhgV/FPWBbAZP77u09c6zMgkfR77ity9Rx2DfjWwUpJsmAL1g TDWItxlH08H4EGtDcM+O35SFI3kDJZEl/vvqCBaLjWr7MkbwhQW3690smPgjvwVTpcrg pThA== 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=xLzPgNOZ8X14gfCEvYWsxDF01OFUZfoQjcWDyuoGltc=; b=iiql63sHnL/5Fv8tP4TC4Jq4Xe4CYVeEOh1ohQntSX1fvMfFbu7DnViIfsrsdQNsCS hReGsCdLn8iPUCZVxaEmp3Mi0bXcQEQpJN7SRPeD8jTyzSwFRZ1hHqMB4pycxvwVSvDm MyrBCRylEuUNWitGipP9dqgIK2oohnE1FbKKduJVi58yUxK0RiI6fcivGMEHCjhOZCGR 7xtDotwjKxBHqsV+Q2GsywhIChY/C/LHCHi4N6OWx1FwLEdeVaDqimcUPnlA4DjSb8Pr 8zkNI+pphIyypHQ+5I3bOJ0lfrUCj0kaxLPY8mC21o9C9XN2aOEHnNxI/KncEA+sRWi7 Qe9Q== X-Gm-Message-State: APjAAAXyUs5OU2PZiiLUTGaKYhZlDiyU58g/kvxmxZiLRsMVHzQEAtpR cjr9pDr8NTaIqfsk/fTTiwRtb2nFOOUc8ISuE2qMGg== X-Received: by 2002:a2e:9759:: with SMTP id f25mr21512398ljj.173.1571812918369; Tue, 22 Oct 2019 23:41:58 -0700 (PDT) MIME-Version: 1.0 References: <157148503415.2989444.7391437309981941226.stgit@toke.dk> <157148503865.2989444.7118792679603045723.stgit@toke.dk> <871rv5ovwr.fsf@toke.dk> In-Reply-To: <871rv5ovwr.fsf@toke.dk> From: Kan Yan Date: Tue, 22 Oct 2019 23:41:47 -0700 Message-ID: Subject: Re: [PATCH v4 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > >> + 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() when > > 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. On Tue, Oct 22, 2019 at 4:35 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > 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() when > > 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. > > 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 :) > > -Toke >