Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1319727rwn; Thu, 15 Sep 2022 13:57:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75rC5T13uvL+EKGml49fBzeAXjUD+XOoZ0NaZdjw3gI2WjJ+ojcUOkSMnvG87OsLxMIFC1 X-Received: by 2002:aa7:c707:0:b0:44e:5193:1b0f with SMTP id i7-20020aa7c707000000b0044e51931b0fmr1451153edq.238.1663275424427; Thu, 15 Sep 2022 13:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663275424; cv=none; d=google.com; s=arc-20160816; b=bRLAcWUK9UuOUN4txKjLz9NrMi8SUg+VeNlsXCWC+l3EWW46zs4x4sGh4EVlFOphlg JybriHXSGY/4cdctYZl915pgJskzJNvv0tVvBFiJ7kH3PhNdHLyudRr+aR+MHBHxY8/Z AHao0t4OoklsPlyx1a4LTAxNncdh0eu4jXk3ZXPv2WKK3sxgLy5sO4hT3Ubj643UkidK +2/OYu+gwU+luIwJMAwp/hXXe9A1iBY4J2hCmXeQWAyhKfxLA5xKd2WtBx2Tb8dJPr+m HI/qhBfDAs91TgAJ0yqf+f3Eh69M62i9xK/zf61yQmFZSjgB6uO86bD7z/uxqey3eyQL rLLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature:dkim-filter; bh=p6zzxpWFa2Tc3QTz+TPu1V71peojvRbihyf8madauVE=; b=WkVOvQpuHjTd5PQRZmARiHa7D4LGhNoLGg0R0ZChk5kRNLdkKArddHcCwvQBA3NIhS c7b8CK6vv+iLtOi4rtC10IQ3nE2+bjwI/21H97OTr/ZEoXNEremZ4H1GUWfwFOZqQ9Ku OngX2iemtiDRYIhPOLCNQ8sTmez/uiQzWxb0pPvL6nE9NdoX431mL81Zc8U0VA8CPbCq MvyyySppGz1Yc2UbmUu7eWbD/t3D3abRIiNvOOaiVFxssFRA8iWXt2TduVund2CqyeIP fQe1k2aU0yvVwrPIWZjMZ0MP0gBadvG7tXMDtePz/Y6u+9kvjqiatMtMDnU2T094SAq7 wVWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=lQP7+hKP; 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=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a056402521400b0043be773a90dsi428097edd.45.2022.09.15.13.56.42; Thu, 15 Sep 2022 13:57:04 -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=@candelatech.com header.s=default header.b=lQP7+hKP; 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=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbiIOUkC (ORCPT + 64 others); Thu, 15 Sep 2022 16:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbiIOUj7 (ORCPT ); Thu, 15 Sep 2022 16:39:59 -0400 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 564313E746 for ; Thu, 15 Sep 2022 13:39:58 -0700 (PDT) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.64.219]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id A65FC1C0082; Thu, 15 Sep 2022 20:39:56 +0000 (UTC) Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 019EB780078; Thu, 15 Sep 2022 20:39:55 +0000 (UTC) Received: from [192.168.100.195] (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 75A5613C2B0; Thu, 15 Sep 2022 13:39:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 75A5613C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1663274395; bh=CXdSqgaZvbYZurzTR43KgBcueolrjK7Dkx4bmtPbzAk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lQP7+hKPRU8QAJW4SzZIHC1mMXD0G7ctmOyDdXMxh+yLc2gy1G2BOsLkZ2+RITv8W xaNmNLhcnyBZoFqOmuBHpu2c6+McZX2kRiivRVAKBxTbLHcdOSQn5Jgi8F3h6ocO1G lYrMoNFfwPSYn2ReIyi9KdgD7wJaLSxqfFPqZm9Q= Subject: Re: [PATCH] mac80211: Ensure vif queues are operational after start To: Alexander Wetzel , Felix Fietkau , linux-wireless@vger.kernel.org Cc: Johannes Berg References: <20220915130946.302803-1-alexander@wetzel-home.de> <26e9ae91-8e13-df45-815c-cb45c1911032@nbd.name> <9e36f219-14a6-8960-a5fd-cb9f708237ed@wetzel-home.de> <0b342479-d04a-a45e-d63b-73eec5a1fb40@wetzel-home.de> From: Ben Greear Organization: Candela Technologies Message-ID: <4f77c10b-a6ea-2b79-cada-deefb2a3a07b@candelatech.com> Date: Thu, 15 Sep 2022 13:39:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <0b342479-d04a-a45e-d63b-73eec5a1fb40@wetzel-home.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-MDID: 1663274397-b4AlKmjo3kZs X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 9/15/22 1:06 PM, Alexander Wetzel wrote: >> >> I've got some doubts that my fix is correct... >> While it fixes the problem in my tests it looks like we'll need another queue restart to get the queues working again. >> >> After all IEEE80211_TXQ_STOP_NETIF_TX will not be cleared when it has been set by __ieee80211_stop_queue(). >> >> I'll update the patch and skip setting vif.txqs_stopped when SDATA_STATE_RUNNING is not set. Not having IEEE80211_TXQ_STOP_NETIF_TX set looks harmless, having >> it set when it should less problematic... > > Scratch that: The patch should be ok as it is: IEEE80211_TXQ_STOP_NETIF_TX is not set on stop, the patch should be ok as it is. > > Sorry for the noise. > > Alexander > To add to the noise... From reading the original patch description, it was to stop an NPE when AP was stopped. I have been testing this patch below and it fixes the problems I saw with multiple vdevs. I was worried that the code in the 'list_for_each_entry_rcu(sta, &local->sta_list, list) {' might still need to run to keep everything in sync (and my patch allows that to happen), but I do not know if that is true or not. diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c768e583aad4..2b5dafe9f4cc 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -370,12 +370,6 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac) local_bh_disable(); spin_lock(&fq->lock); - if (!test_bit(SDATA_STATE_RUNNING, &sdata->state)) - goto out; - - if (sdata->vif.type == NL80211_IFTYPE_AP) - ps = &sdata->bss->ps; - sdata->vif.txqs_stopped[ac] = false; list_for_each_entry_rcu(sta, &local->sta_list, list) { @@ -408,6 +402,10 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac) txqi = to_txq_info(vif->txq); + if (test_bit(SDATA_STATE_RUNNING, &sdata->state)) + if (sdata->vif.type == NL80211_IFTYPE_AP) + ps = &sdata->bss->ps; + if (!test_and_clear_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags) || (ps && atomic_read(&ps->num_sta_ps)) || ac != vif->txq->ac) goto out; Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com