Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp624350ybc; Fri, 22 Nov 2019 10:23:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwIyGOvIn0A6J5oh2K2aB+UJ+jAfrYSdayRVqZKfQdj7RJk/C7AMRsdaKF71j3ID+VsrFsf X-Received: by 2002:a05:6402:886:: with SMTP id e6mr2761762edy.46.1574447004408; Fri, 22 Nov 2019 10:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574447004; cv=none; d=google.com; s=arc-20160816; b=pyXgcHxbt16XP/o1Gqvp7M7d/npNdCkSNnvOA6iklYbymIyE11MN6os1tSqv68oOMt Y9B7uP2Hlbj/EezTkXhczRTlynFvRlQ+SVK29I4ExUX6XPQ/uVYYtKJsEUaxSzZZN9ZA 245nmVsW27blI2n5Ayr8PiC82kY0Nlo646vbA7Pq0eKYGTLalKmuY5pisv9+FCkIrfao Oi58XOTzNI/bgeOOgiBUBCDyJShHZvwew5/ngmnEigMMwYelWTjGLEPocgKDMsh89d9B MfMWh1lIxG/8bocT+FvpbFfzmOmq3XH35SzZamRQsEfSzc9x3rj17Rw7BegGzdQvZTEZ h6Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:dkim-signature :dkim-filter; bh=CzdFiSH27jclv4YQh4/pcj4xZExnzlvKWvs+WeCNy/I=; b=Hhu91E4WwUpBn7dH974ko5X7qUHbRF71vf2be5BhtRLO8+bkaUfG5ASSBlLLSjtMJG vYSMcBqbJA0PbUEU4ddNKoDQWLYAz0ek1gXASge+Ul8Q+ROl6Z8arbTTZkZ5ukOyRdbn IaBKg+UHXoh/B9HJEJSOVkpsK5bJnaDRr+VReDAt9QrKmNHxOTEah36jZAvu4RHdcJVv K4O1gqm9aY9HM4YQMmyib50QC6ekoiNoKSDpcXjWwGoVw3t14b2kjL42RAAm5x1N6CSS f67slplMoj3ktwy0TjmDIDnOyqjlXnhdDPhEqaEQonnjvsoUrqMQl46Mz/1eFQ/VTXuJ DTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=YUNU7WfD; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id f2si4628615ejr.260.2019.11.22.10.22.52; Fri, 22 Nov 2019 10:23:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=YUNU7WfD; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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 S1726676AbfKVSWl (ORCPT + 99 others); Fri, 22 Nov 2019 13:22:41 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:36150 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfKVSWl (ORCPT ); Fri, 22 Nov 2019 13:22:41 -0500 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 BDD5613C359; Fri, 22 Nov 2019 10:22:40 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com BDD5613C359 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1574446960; bh=H5lKRZGfjQs5omPP4QivF8LYeGAa5yYNBbYUBGQFoNA=; h=Subject:To:References:From:Date:In-Reply-To:From; b=YUNU7WfDlyYV/YVYxRNuzLDh7qyxZwE/U8Cjn9KS6lMEW3TK3aAm5WiDDUftEgk5D jkfiFiA4Ev76q5f1Om1Jttohw/AG7RgZ3GJ2KOWN0FnG/35agRMeKLFmrK1azKVD2Q VYCCPrC4eL83QZmfIh5GG8NiOZhl5l9AFh8TW69Y= Subject: Re: [PATCH 00/10] Ben's grab bag of mac80211 patches To: Johannes Berg , linux-wireless@vger.kernel.org References: <20191108194210.23618-1-greearb@candelatech.com> <40f85196f29bf0dc4bfbe57345a5db4d7aff7f89.camel@sipsolutions.net> <99eeff65-80de-bb8d-00ba-1863e232476f@candelatech.com> <126ddcaac00f3c2de1c25097aa2e42af74dc4a75.camel@sipsolutions.net> From: Ben Greear Organization: Candela Technologies Message-ID: Date: Fri, 22 Nov 2019 10:22:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <126ddcaac00f3c2de1c25097aa2e42af74dc4a75.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 11/22/19 9:53 AM, Johannes Berg wrote: > On Fri, 2019-11-22 at 08:37 -0800, Ben Greear wrote: > >> Well, 1 out of 10 ain't that bad! > > Heh. > >>> 5 seems like it might be reasonable, but it's hard to read and >>> understand, maybe revisit that? >> >> This is the patch you previously said you liked but it would not apply upstream. >> Now it applies. That whole code mess is hard to understand, but I have been running >> a similar patch for a while and it has worked well. >> >> Instead of trying to understand the patch, try applying it and then read the resulting >> code. It is a lot simpler to understand that way I think. > > OK :) > >> You can also sniff air with current code w/out this patch and watch the crappy >> retry behaviour where the retries are clumped in a few ms of time instead of being >> spread out. > > Right. I'll have to review this carefully. I think the Intel firmware > will soon spread out the hardware retries a bit too (vs. here the > software retries). > >> Ath10k will always use legacy rates for ctrl frames and such even if > > *control* frames have a very tightly controlled rate, e.g. ACK must have > the same or next lower mandatory rate, or basic rate, or something. I > don't have it in my head right now. > > Do you mean *management* frames? Yes, I mean all sorts of frames that should use legacy rates. When you 'set the rate' in ath10k, you are really just setting the data-packet's rate, and upstream driver/firmware has other limitations (you can set single rate, or mcs-8 or mcs-9, but you cannot tell it to use mcs-5 and mcs-6 only, for instance). There are other ways to adjust management frame rates, but it is not through normal mac80211 rate-setting logic. >> you otherwise restrict the rateset. So, it is legit to set a single rate even if >> that would leave no legacy rates configured as far as mac80211 is concerned. >> >> Your patch broke the ability to set a single rate in ath10k, and my change will >> allow it to work again. > > Either way, it's kind of an ath10k bug in a sense. You don't actually > want to "set this single rate", you want to "set this single rate for > data frames" or so ... which is a different API. > > If you look at ath9k or any other driver with software rate control, it > would not be able to pick a legacy rate for mgmt frames at all with your > patch and the warning, and then I'm pretty sure you'll hit a WARN_ON() > in rate.c. > > So no, I will certainly not apply this. > > Maybe you want to add a different API that affects only data frames (or > a variant of this API or something), instead, but this is not it. We > can't leave the software drivers without any rates to pick from for > management frames. Maybe we can add a driver flag that indicates we can relax this check and have ath10k set that flag? Adding a whole top to bottom API to change how rates are set sounds like a pain, and would probably be specific to ath10k only in the end anyway? (Remember the discussion about setting advertised vs used rates? This would be even more complex and less useful than that I think). > >>> 8 I don't like at all. How about you do it in the driver somehow? >> >> I had low hopes for this one anyway. mac80211 has the software decrypt logic, not the >> driver, so it seemed reasonable to have the mac80211 do a callback. This patch is likely >> only useful for drivers that do block-ack in the firmware and support software decrypt, >> which may only be my modified ath10k-ct driver/firmware. > > So far that's the only one, as far as I can tell, yeah ... > >>> 9 is like 2-4 really, I guess maybe this one I could get behind if it >>> came with a commit log that actually explains why one is likely to hit >>> this multiple times or something? >> >> Basically, it is almost never useful to use WARN_ON instead of WARN_ON_ONCE. If you ever >> do hit the bug, often the logs are full of WARN_ON spam and you cannot even find the real problem >> until you change it to WARN_ON_ONCE and reproduce the problem. >> >> I hit this problem due to some coding bug while poking at ath10k, and you get one splat >> per tx frame, so you can image the spam. > > Yeah, but does it matter? It should really just happen during > development, right? Having the _ONCE makes this cost more space and > code, and I'm not sure I see that much point in that. Sure, for this one. The sdata-in-driver warnings happen often-ish in ath10k. No one can figure out how to fix it, or really cares to look I think. But, really, not worth arguing over. The main patch in this series that I would like to see upstream is the one that tweaks retry logic. Others are fairly easy to maintain outside the tree and are of more limited use to the general user. > >>> 10 we did to fix other behaviour, so ... >> >> This one is especially useful for roaming several virtual stations, but maybe that is only useful test >> case. I included it more as an RFC, but it has worked well enough for us in case you see some worth in >> it (and obviously it should be changed to not use // comments in case the functionality is actually >> deemed useful). > > I guess we can go back and forth on this ... but in most cases you don't > know that the AP didn't go away, so IMHO the current behaviour is > better. It's just in your special case you know it's more likely some > local issues vs. the AP having disappeared. What I saw is that supplicant would try to do a roam, and kernel would reject it because it had just deleted the object. Maybe it is better to have the kernel be more lenient and let supplicant take care of the policy decisions? Thanks, Ben > > johannes > -- Ben Greear Candela Technologies Inc http://www.candelatech.com