Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1215772rwb; Thu, 6 Oct 2022 09:53:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6u1PxH+IFn8VyO4Z4jF/qSO59dfk+U6iU95JJAgXbn3K+Ec3kxYs36e4QDntTglO4xJQUB X-Received: by 2002:a17:906:6a13:b0:78c:71c0:e615 with SMTP id qw19-20020a1709066a1300b0078c71c0e615mr597897ejc.363.1665075226740; Thu, 06 Oct 2022 09:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665075226; cv=none; d=google.com; s=arc-20160816; b=ygNVQ/XPXEBpvmIfcHcefRCf2rJ+i0zkVp7zo3ZsZyQyb/7MAIDBYqNCROlBXMnGqI mHdIHhRLmX8qTn1E+EGCHj8H+JePp+tR7PlLnCFOd8u8NDRCP4sFkBcpe1e8uKJjIHUv 7eHXevEVGss6s7Rq5DVyJHA7dM1h9QKWhbBiRsdDMkB03iipVrurIKVC3cyMPidx2VwV eER9k2wpjvli3GN4jOoFbXN389jiIgJus9a7jkzctCteHesa0tNdnR8wxVme44OKjAsK p4sWW8omlYzzxdfd1k3xSMPz34IhTkR7mQ2xRGalRim7MUnugZs5J8XJzFaMD7HyDNTu w4Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :dkim-signature:message-id; bh=lQhSvVzy8G9GofReLTu/3S9FLQp7XXQ4aJip+j1zoGc=; b=wzpd8mt7BXEUEUyRUjejdzjAV+nc96MVQ1k9DW7ZcLrr7PlkOPyTOR/8FfZ2akRbwZ 58Fu0i2R25jxKRw+dqwI+pekx1hvHOD4vyZA8xpU5CRjOSzkIw1mJVsE7hThP+/SS7kf mOWYNnLWdq7h5LZWSFHouNH0kM1pgBhUiYtGPQlLKh94QbKmMcm4RVNeNARluZ+A5e1S /4OzqSYBeGYZzZtzO7uzVnCPZyJgunzE/hYI5ET/MUtb0WcfArh2XNB9gXRvX0o+JnrZ s8xmttUsYlKjevXl3w29gGleuQvQ4wVF1QOMrvxsKfU9cgRYwIn7PBvWpu1vd2ECzlAF sseA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wetzel-home.de header.s=wetzel-home header.b=BTRT4fKQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wetzel-home.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a50ee85000000b00459681caecdsi6694911edr.286.2022.10.06.09.53.26; Thu, 06 Oct 2022 09:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wetzel-home.de header.s=wetzel-home header.b=BTRT4fKQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wetzel-home.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231452AbiJFQmx (ORCPT + 61 others); Thu, 6 Oct 2022 12:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbiJFQmw (ORCPT ); Thu, 6 Oct 2022 12:42:52 -0400 Received: from ns2.wdyn.eu (ns2.wdyn.eu [IPv6:2a03:4000:40:5b2::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 44558A5980 for ; Thu, 6 Oct 2022 09:42:51 -0700 (PDT) Message-ID: <147787be-2a36-be70-92fd-b9d7f26f57cf@wetzel-home.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wetzel-home.de; s=wetzel-home; t=1665074570; bh=9gd2i9kQxBIP+htIkxEn/YZtk+n1mrsFCUqK4bGtQ/o=; h=Date:Subject:To:References:From:In-Reply-To; b=BTRT4fKQIskfZNVBba9mmh3ezqRGtZ1u3fZufC2eKgFegAf6LW0/SJmdjRZofj3id bQ+YErmdYTqHQLVkPX7skB8lVY8Tky29KwUx5ZdispKBk7qvMx2KOU1zZtTJrH7I+k rPCRuhd09QrxW6vTwcwcR8TQ+mK0ZyxFoQOU8zmQ= Date: Thu, 6 Oct 2022 18:42:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] wifi: mac80211: Use internal TX queues for all drivers Content-Language: en-US To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Johannes Berg , linux-wireless@vger.kernel.org References: <20220926161303.13035-1-alexander@wetzel-home.de> <96e9ad692842853cfe92a7e5de18136baf20a492.camel@sipsolutions.net> <875ygyihhm.fsf@toke.dk> <87r0zmgwli.fsf@toke.dk> From: Alexander Wetzel In-Reply-To: <87r0zmgwli.fsf@toke.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 05.10.22 16:43, Toke Høiland-Jørgensen wrote: > Johannes Berg writes: > >> On Wed, 2022-10-05 at 14:26 +0200, Toke Høiland-Jørgensen wrote: >> >>>> void ieee80211_handle_wake_tx_queue(struct ieee80211_hw *hw, >>>> struct ieee80211_txq *txq) >>>> { >>>> ... *local = from_hw(hw); >>>> ... *sdata = from_vif(txq->vif); >>>> >>>> wake_tx_push_queue(local, sdata, txq); >>>> } >>>> >>>> Actually ... I wonder why you'd here - in waking a single TXQ - use >>>> ieee80211_next_txq() at all, Toke, what do you think? >>> >>> Well, this patch does almost exactly the same as the ath9k driver does, ath9k was indeed the "template" I used. Mentioned that in the RFC but dropped that in the final patch. >>> for instance. Really, the wake_tx_queue() is a signal to the driver to >>> start transmitting on the *hardware* queue that the txq points to. For >>> some drivers (like Intel, right?) that's a 1-to-1 mapping, for others >>> there are multiple TXQs being scheduled on the same HW-TXQ. So I think >>> it's probably the right thing to do to just call next_txq(); if there's >>> only a single TXQ scheduled it should be pretty cheap to do so. >> >> Oh OK. So then the logic Alexander had makes sense. > > Yup, I think so :) > As mentioned I initially just cloned the logic from ath9k but my reasoning why it's done that way is a bit different: By calling ieee80211_next_txq() we are making sure that we indeed are starting TX on the highest prio iTXQ for that AC. >>> >>> This logic has implications for putting "urgent" frames (like PS(?)) on >>> TXQs as well, of course, but that needs to be handled somehow anyway... >> >> But that probably then anyway needs to be handled in next_txq()? > > Yeah, just meant that comment as an "for future reference", it doesn't > impact this patch series (I think?) > So far my PS on iTXQ patch is just adding a fallback queue I'm using as replacement for the push path. Idea then is, skip the iTXQs with PS frames (vif.txq and all sta.txq[]) on the wake_tx_queue calls till they are listening. When a driver wants to dequeue MPDUs early they still can do that via the existing functions. I have the skeleton for that and at least my notebook still has connectivity with it there are multiple areas needing more work prior to even think about testing it... I'll keep you posted. > -Toke Alexander