Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp631927ybe; Wed, 11 Sep 2019 02:12:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqznvKFrO9Zcxm32B92CG5UFTTxV0qfbwHrZVDDEGG+V953pdJbujuV7K5jzxDeCOVXiOwCu X-Received: by 2002:a50:9e26:: with SMTP id z35mr35139852ede.265.1568193178069; Wed, 11 Sep 2019 02:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568193178; cv=none; d=google.com; s=arc-20160816; b=fWM4vy85qz5l7GmrGkJ4c+VLpl4YogDQlUgPoOK6E5/0JdSIYaN6a0INBYHtkVyz7W 3lK26Ws7JAYodXtJbjacq5HPzV4ulLhF4CWx2JMxah7Hbb4gpm2Fhe3jhkpOSRmPPj+R HIug5rvKmr+sXCVLVHEJeXKZcwaojImkH9D9KKaXXgOE4WFL2BizZdW7Y56ytzVEpB24 FKt3d7+Xhy30+sD0FQBvEuuQcQFSV/CJu1ue6eKejIY9LzS9IFn41l4N4idAw/svvmzQ UDSQbV6DI4PJAbE7DdNVN6cX6AzYXzogw5ycfHWj4Wcw8RVxPidaB7RQa9iTHcFlJQW5 TdOg== 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:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=rP6PvLx5aiX+buaR6CEOzrXJWwC5bPcwdWQskeXfP5Y=; b=sY1NDctEqFOXp02TuTR+J05yUwPWdTUWzFRYTmt6i9zO+ZZfYVzr3nfVxEGVqJvq5R boXC/q9dTus3OI6uKrpgFoefL8bfxJ5AEo2DJ+KFxj7cIYGCCmuTPbimG57ovoni8jss LmMp9V9AK8booQMoFGWQCeTIm9b9G/WAylD5Z96bszcYuPCsnsCc/TNP6Z+amcQIGCA7 hyZFuC6rsGvhq7P6DfCGvpFSTCiHvU3juIbDofwywkfyebPCt3la2YBK1C7alHaL2eDZ fh98wuch/vSvW8JB2mMuJ2gvsmQVAAV2UPoKVb33KzDYDGmtgfbKnak5oI3kV3468Tka 4ttg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si9881365ejd.150.2019.09.11.02.12.29; Wed, 11 Sep 2019 02:12:58 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbfIKJJK (ORCPT + 99 others); Wed, 11 Sep 2019 05:09:10 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:33946 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727364AbfIKJJK (ORCPT ); Wed, 11 Sep 2019 05:09:10 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i7yce-0002Ft-Th; Wed, 11 Sep 2019 11:09:09 +0200 Message-ID: Subject: Re: [RFC 0/4] Allow live MAC address change From: Johannes Berg To: James Prestwood , linux-wireless@vger.kernel.org Date: Wed, 11 Sep 2019 11:09:07 +0200 In-Reply-To: <20190904191155.28056-1-prestwoj@gmail.com> (sfid-20190904_221357_305070_478BF6CA) References: <20190904191155.28056-1-prestwoj@gmail.com> (sfid-20190904_221357_305070_478BF6CA) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi James, TBH, I'm still not really convinced. > I have taken some timings for all 3 ways of changing the MAC. Powered > change via RTNL, non powered via RTNL, and changing through > CMD_CONNECT. All times were taken in microseconds and tested on an > Intel 7260 PCI wireless adapter: From where to where did you measure? I mean, clearly you cannot have counted all the way to the connection? > Powered via RTNL: > > Average: 294508.9 > Min: 284523 > Max: 300345 > > ================================== > Non-Powered via RTNL: > > Average: 14824.7 > Min: 11037 > Max: 17812 > > Speedup from powered change: 19.87x (average) I'm assuming that this version is the IFF_LIVE_ADDR_CHANGE + setting the MAC address via RTNL? If so, yeah, obviously not powering off the firmware will be much faster than powering it off. That's an easy win really. > ================================== > via CMD_CONNECT: > > Average: 11848.7 > Min: 9748 > Max: 17152 > > Speedup from powered change: 24.86x (average) And this really only gives you a gain of 3ms. That'd be nice, but like I said before, it's not the only thing we/you should be thinking about. One fundamental issue I have with this is that you're now combining together temporary with persistent state changes. After a disconnection (or connection failure), the interface usually goes back to its previous state. With this change, you're keeping the MAC address modified though. Sure, you don't care (because you're probably going use a new random address later anyway), but these are still things we should consider in an API. I'll happily take the subset of the patches that implements the IFF_LIVE_ADDR_CHANGE in mac80211, but I don't think the 3ms win there wins over having a well-defined API. johannes