Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp9838pxk; Wed, 16 Sep 2020 15:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGNzu4yavj0OxoiFM0qpdcwtVHUG3FpkgZlKVZAP/Rvf0TG44Uz8NWOZz8KQW6tr0I85Pk X-Received: by 2002:a50:875b:: with SMTP id 27mr29461970edv.117.1600295483596; Wed, 16 Sep 2020 15:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600295483; cv=none; d=google.com; s=arc-20160816; b=uA9z7ucxZSnvPcwAWkv6s1jacUALxfkWtr+XtUVpFeXEFn0a56lJtmyJCPBupdy7V+ pHUCSB9etzU/MVgzD0jAn/L9/esGEyMmpQ9DWRHEfXbkk/hMfYxGJLG0vH8Oloz7TRRR 1hAbWCOvVL3EIXs0N4xFB/5bj2VtH+CFgT4zFczmEYMuAxkh+W+jM0U5dlsxjHtdVYy7 RC/lvmpZXLbT9NfquRhddw3uc98BF+omlMQs+j2yiGvhlZKpw0iGGBHbUsXLqipCnOii iYQ0USRMeGTX+Ur92ClPebPxXZVk55CxWoPtPb8sFZmFsq01a48SsrZbHEGE+ma/eMXP xDVQ== 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=KZHqNrou3W6Wv7nPGm6x82A9pZMkCEM2fiIepRSpyrU=; b=yuhR9D50nU+OyoOzSVJqHYiRBui3PLDjjK2jw52RB8m85QFRlfw+3kh5/DY+5vW9R+ NlcFvdZYLqR9thb2XnE+TbXSCuSQ+W2Q5Sw+XbdKpdAue1QelnZxnR5g0pqW6PairSBV xeskASC66Av1emRuO0czgDpJ3chw7m3szHEu5k+lbZZyTys5P0PkFOjl9MTXL1OCbjst 2nPlVIBqF5WcAQrUbn3UK0MzPp7FVe/tcG/XDyxDARWfY/hz8eHA+wK6wKK2kfb7LvzE OV/WDaweilnk81uZ4LCLxY/uDBHo15CE/jtf5l90lmF3RJIctTAf+ffQ3LEgYh3lJgmE /QPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=XtSQ1iS0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lc12si11904034ejb.491.2020.09.16.15.30.48; Wed, 16 Sep 2020 15:31:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=XtSQ1iS0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 S1726419AbgIPW2Q (ORCPT + 99 others); Wed, 16 Sep 2020 18:28:16 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:39040 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgIPW2Q (ORCPT ); Wed, 16 Sep 2020 18:28:16 -0400 Received: from [192.168.254.6] (unknown [50.34.202.127]) (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 2466713C2B0; Wed, 16 Sep 2020 15:28:15 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 2466713C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1600295295; bh=TKlFpo4QXqO7jDcnZxjIoNr1Nuv3yHnLSWqA5dCPa2c=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XtSQ1iS0Vcj11/EFjY7VNsvyOxvjOTPNO1mqfTNcXO8xmJjetj2cFvoV4th0FPgR5 mhxTRBu5xSKCWsCF4wZjmdMO1IE/UnKb1W944lnl4hhrfYEX+NcPc2CUKTxzc1n/Kk Ur54/xugjSZjmg3NkdplCQnn51VdSwMGbHbuXz14= Subject: Re: [PATCH] mac80211: do not iterate active interfaces when in re-configure To: Johannes Berg , linux-wireless@vger.kernel.org Cc: Kalle Valo References: <20200525165317.2269-1-greearb@candelatech.com> <7f2722c9d30bb1a4715398b4f29309b1f383593b.camel@sipsolutions.net> <6a0f46b1-54c0-c090-56e6-7cca3b295691@candelatech.com> <2bcd9fbd6d141d6e78f606fd7f96fb99573810d2.camel@sipsolutions.net> <98996ee9-a9cc-521b-05cc-1404d3b9b251@candelatech.com> From: Ben Greear Organization: Candela Technologies Message-ID: Date: Wed, 16 Sep 2020 15:28:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-MW Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 7/30/20 8:03 AM, Johannes Berg wrote: > On Thu, 2020-07-30 at 07:52 -0700, Ben Greear wrote: > >>> Consider >>> >>> add interface wlan0 >>> add interface wlan1 >>> iterate active interfaces -> wlan0 wlan1 >>> add interface wlan2 >>> iterate active interfaces -> wlan0 wlan1 wlan2 >>> >>> If you apply this scenario to a restart, which ought to be functionally >>> equivalent to the normal startup, just compressed in time, you're >>> basically saying that today you get >>> >>> add interface wlan0 >>> add interface wlan1 >>> iterate active interfaces -> wlan0 wlan1 wlan2 << problem here >>> add interface wlan2 >>> iterate active interfaces -> wlan0 wlan1 wlan2 >>> >>> which yeah, totally seems wrong. >>> >>> But fixing that to be >>> >>> add interface wlan0 >>> add interface wlan1 >>> iterate active interfaces -> >>> >>> add interface wlan2 >>> iterate active interfaces -> >>> (or >>> maybe -> wlan0 wlan1 wlan2 if the reconfig already completed) >>> >>> seems equally wrong? >> >> So, looks like there is a flags option passed to the iterate logic, and it is indeed called >> directly from drivers. So, I could just add a new flag value, and | it in when calling from ath10k. >> >> I'm not sure it would really solve the second case, but at least in practice, >> that one doesn't seem to be a problem with ath10k, and the first case *was* >> a problem. >> >> If that sounds OK to you, I'll work on the patch as described. > > Right, that'd be the option 2. I described earlier. I can live with that > even if I'd prefer to fix it as per 1. to "make sense". But I guess > there could even be "more legitimate" cases to not want to iterate while > restarting, even if I'm not really sure where that'd make sense? > > I guess Kalle should comment on whether he'd accept that into the > driver. > > Kalle, as you can see above mac80211 appears to be broken wrt. iterating > "active" interfaces during a restart - the iteration considers all > interfaces active that were active before the restart, not just the ones > that were already re-added to the driver. Ben says this causes trouble > in ath10k. > > IMHO the right fix for this would be to fix the iteration to only reach > the ones that have been re-added, like I've said above. OTOH, Ben isn't > really convinced that that's right, and has experience with a patch that > makes mac80211 return *no* interfaces whatsoever in the iteration when > done while in restart. Like I say there, it seems wrong to me. > > But depending on what ath10k actually _does_ with this list, perhaps > it's not an issue. Perhaps it's just transient state that it derives > from it, so if it does it again after the reconfig is completed, it > would in fact get all the information it needed. > > I'm pretty sure this would break iwlwifi, so one option (less preferred) > would be to add a flag to say "skip iteration in reconfig". > > actually does the driver know it's in reconfig? Perhaps it could even do > that completely on its own? > > Anyway, the question is what you think about doing such a thing in the > driver, if it fixes issues even if it's probably not really correct. > > johannes So, no response from Kalle on this for some time. I thought I'd ping one more time before I make an effort to create another out-of-tree patch. Johannes, if you are OK with a new flag in mac80211, then I can patch ath10k-ct driver regardless of whether other drivers use it. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com