Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp685173imw; Fri, 8 Jul 2022 09:50:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRK6Ygkiml1/BERi5RkDSCp9pE/onMnfT80Wip3r3KswuQE+qb/qLMY8u/br6cTbnqVYKN X-Received: by 2002:aa7:cdc2:0:b0:43a:7255:5274 with SMTP id h2-20020aa7cdc2000000b0043a72555274mr6097425edw.159.1657299052066; Fri, 08 Jul 2022 09:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657299052; cv=none; d=google.com; s=arc-20160816; b=Nuy+tNccHRgF9GpaFUKANr1kF5B2JbImXSMcoORl5Kqqkb3t9ZbA/ILAlxFVazYRSp GpSivCaQ+aMp3fo/6+0D1VQuSsY3keUWZdxxHmvkRoMCVVe8A0MpzgoGOIMwMIb5F4Ag J0wbSa7vxEjBlndVrJTlPjaJc4aXcNNZEMma2G4DqidLxDh2AipJBxDeCSGd8XtyCYuO b5Hk9ybAHLXjwTJ9iNhRV2UbK8+tuMfxrBnZJYc7p+iB15fcJ9Nt45pJOOhm4I7T3a4/ GPqcxsMoDWhpjTlEj83TTvzBf1Y3zbcOsFmwY03MTplzy3nDNWiaXXesuKwvOA3dG/FW x2Kg== 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:cc:to:content-language:subject:user-agent:mime-version :date:dkim-signature:message-id; bh=vJ0v6Zfj5HbkkqJttkLhGR7Nly1f97ri9VB/j67maIs=; b=hQ6cKAuYula3xk98pOE0eTGupmqPwwVf7MUcNw3nH3/3a26BqKMvEv5ozab5yy4aQ9 +7dyWbM1uj1tbUfdXP6ZCbzmQFPoN/0BftSKfuFQ189jyTGPQYgHQN9psEZ23EgtbCrJ eEXbIdIq5Y5jBBfuXPngXRYm1rpXHE+LlitTsdFnZPHno1VuFqI3iz2hNQE9bd/CzEz2 TZbOf5V3uv2jqRhQh7F+/ga7RUqc+zezYNEQug4b3IyhRhKjszqifTuGT6S8FeEQjEb8 /tplIAO1cOHlzi2NICqpoc+pxLOMSKwkzbjoX0rG5tzRRBJK+HG0sjDUCAmdKFoYTzio +9ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wetzel-home.de header.s=wetzel-home header.b=LaIYQ2Ok; 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 b7-20020a056402278700b004381b6af19csi1504208ede.155.2022.07.08.09.50.28; Fri, 08 Jul 2022 09:50:52 -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=LaIYQ2Ok; 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 S238358AbiGHQmm (ORCPT + 66 others); Fri, 8 Jul 2022 12:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237862AbiGHQmm (ORCPT ); Fri, 8 Jul 2022 12:42:42 -0400 X-Greylist: delayed 94183 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 08 Jul 2022 09:42:39 PDT Received: from ns2.wdyn.eu (ns2.wdyn.eu [5.252.227.236]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9FF3F71BC6 for ; Fri, 8 Jul 2022 09:42:39 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wetzel-home.de; s=wetzel-home; t=1657298555; bh=IByOfmBF1TQgJlwVpl2pS7M28VEsjYCsdWbP9aoeGwI=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=LaIYQ2OkZALjvyVxNvi5UlaDjnURNqW1ebUdSPfkx2rn85y/Tv92bG8uamjk2lWKW 8PbGJjH4+OaF2iKDhwrXpEJwJnMmbTatysLcb2KAdUyH2IjA8qCv2jEN5FvOL5mVRl qCP9Wcya3vChzmwuimVQM5egTykiCdx2qjDAV1Hc= Date: Fri, 8 Jul 2022 18:42:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC] mac80211: Switch all drivers over to iTXQs Content-Language: en-US To: Johannes Berg Cc: linux-wireless@vger.kernel.org References: <20220707143230.21686-1-alexander@wetzel-home.de> From: Alexander Wetzel In-Reply-To: <20220707143230.21686-1-alexander@wetzel-home.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 > This patch is working for at least iwldvm. It exposes what seems to > be an existing iwldvm driver bug, though. Driver and card continues > to work, making that a minor side show for now. (I started to look into > that a bit, maybe more about that in another mail later.) > Initial tests are indicating comparable speeds in my setup for iwldvm, > maybe trending to be a bit slower. > > For now I'm interested what I may have missed or what should be done > differently, so we dare to merge it. I'll planning to run some more > tests and use iwldvm with this patch on my main workstation for some > days at least. I followed up on the iwldvm driver issue. The problem is, that the push API drivers are expecting that tx immediately stops after calling ieee80211_stop_queue(). And this patch breaks that. For iwldvm this happens: - the HW queues are getting full, iwldvm calls ieee80211_stop_queue() - the (patched) mac80211 stops the queue but is not aborting the running wake_tx_queue() tasklet. Which goes on to hand over skbs to the driver - The driver runs out of the "internal reserve" hw buffers and starts to add the new skbs to the overflow queue - some hw buffers are reclaimed and the driver tries to process the skbs in the overflow q - For that it releases the internal lock for tx, assuming mac80211 stopped handing over skbs - the still running wake_tx_queue() function from mac80211 hands over the next skb, grapping the slot(s) intended to be used for the skbs in the driver overflow queue. - which breaks an iwlwifi internal rule how sequence numbers are mapped to hw queue slots, causing the warning I got. I'll fix that and send a new patch. Alexander