Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BAF0C43381 for ; Mon, 18 Mar 2019 22:37:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1591C204EC for ; Mon, 18 Mar 2019 22:37:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="BTehlUHl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727455AbfCRWhM (ORCPT ); Mon, 18 Mar 2019 18:37:12 -0400 Received: from nbd.name ([46.4.11.11]:59906 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbfCRWhL (ORCPT ); Mon, 18 Mar 2019 18:37:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=A0D8lHaCUiR8msKnjdvCRqh3x7Ig2yGVoUqx8I1lMUs=; b=BTehlUHlSfmoiWdzxbE26JF4Vr +/satmyGSiIJaIPX/sYV5MbdaakMhJwuDthzKvc2OHJfv/lwA+5KrXVc6HnB8R4vxFs6QiZ3CsxrM plLgMAHn5MM3aWpWC49bullLbH6cSRu8tvqO8ac98sQRwKXgI19Su5LuAW+Hhy+mk3HM=; Received: from p4ff1316d.dip0.t-ipconnect.de ([79.241.49.109] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1h60sY-00069V-5p; Mon, 18 Mar 2019 23:37:10 +0100 Subject: Re: [PATCH 1/6] mt76: use mac80211 txq scheduling To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , linux-wireless@vger.kernel.org References: <20190316204242.73560-1-nbd@nbd.name> <87muluv4hd.fsf@toke.dk> <7b9a0a24-14b0-9b96-0010-ce9f96308ad0@nbd.name> <875zshviqg.fsf@toke.dk> <2cc1f1d4-f07e-faa0-ede7-95dd2917a64a@nbd.name> <87r2b5tb6a.fsf@toke.dk> <111434f9-f04c-2fe2-c2b4-de757efc884c@nbd.name> <87sgvjsud7.fsf@toke.dk> From: Felix Fietkau Openpgp: preference=signencrypt Autocrypt: addr=nbd@nbd.name; prefer-encrypt=mutual; keydata= mQGiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy+MajAL+R73TwLq3LnKpIcCwftyQXK5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23:37:09 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <87sgvjsud7.fsf@toke.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019-03-18 23:14, Toke Høiland-Jørgensen wrote: > Felix Fietkau writes: > >> On 2019-03-17 22:59, Toke Høiland-Jørgensen wrote: >>> Felix Fietkau writes: >>>> I've looked at ath9k (the only user at the moment), and it seems to call >>>> the function in that way already: at PS wake or tx status time if it has >>>> frames in its internal retry queue. >>>> While it does not match the current documented behavior for that >>>> function, it nicely fits ath9k's currently unfulfilled expectations ;) >>> >>> Heh, fair point :) >> I noticed another issue: after the migration to the mac80211 txq >> scheduling code, ath9k does not handle stations going to powersave >> properly anymore. mac80211 keeps returning txqs for stations that have >> gone to sleep and ath9k will send out frames for them. > > Ah, right. Never did have a good grip on the powersave code... > >> We could deal with this in the driver and simply not return queues for >> stations in PS mode, or mac80211 could actively cancel them once a >> station enters PS mode. What do you prefer? > > I think the cleanest would be if mac80211 handled it and just > un-scheduled stations when they go to sleep. I agree. I'll send a patch tomorrow. > BTW, I was just thinking the other day about why the retry queue is kept > around when a station goes to sleep? Isn't the station usually sleeping > pretty long (>100 ms), where it might make more sense to drop things > rather than try again once i comes back? It doesn't always sleep long. It might just be background scanning. There's no way for the AP to know in advance. In any case, the A-MPDU receiver reorder window still needs to be maintained, so dropping frames means we'd have to send a BAR frame to notify the receiver, which costs airtime as well. - Felix