Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp569010imm; Fri, 29 Jun 2018 02:44:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIoL5tssCIa3T8+nimADfz5cdPo3Hp+WTjxa0wcNvYG7HmAYeTSrL1bjVxuAZ9WuJftjAzD X-Received: by 2002:a17:902:b60c:: with SMTP id b12-v6mr14196975pls.44.1530265492701; Fri, 29 Jun 2018 02:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530265492; cv=none; d=google.com; s=arc-20160816; b=0Su3bvm4OjMcvI7kIXK9a/fTlE8Ij6aZ1MU48qnEiZY+FJyrebDMYDEfn4qeyVu4U+ Rnoqrdf76Bu94Qsg49CpuKLrs7OfDG82Ptm1QFmNS8/90bfrojVLK69SYNww3M1Oi1kI f+omaaY/35ZtgQa5KlxBq+nRNMcNkIN/L00lT4Nw1+BzULlkfwnmkvaQpT5zkOc8ySJw I8yL41StEcDcTGt9PJebCgRgW46zHUki6WIlKPJKuHcxrRKsy7auynxGZeW+VPUhT5mZ 4Zs3ZhYY1qlDEoT3uoTKzkQ0lnVFvS0v2fD7Q6ENUZ2gg3+xSFI/qQsiYWAor3l6GgW2 jA3A== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=zL/ZqvT94QWkak4cvxjHrDsRbaJZ8XXcsF7kwr5ERuk=; b=XMrifJ/VfUGjV6/e+flwOynGBj6a819WovKv95pi3JHjpWki7W9zxx4xKtpKClvk81 VyaJ2uKi2LAKd8SOIqu+7pleFRb2gF5FfHogjvEkhpJ0tmtaW+lcNkk1Ao0RZWrn0Q2E 0NZorAD02gmppKz/pTk7RKBQPAKVwnqNriYAEftfTj6RLQVEm/8YXG7KfLTwOXRw4str J82pens7ITJLkw5F8TMvHFBQQXHjsn3IWpKKHJy/VKlAGbuJeQddJ24tYmjJcd2Ba//q ngv4L/AGiize6z/9EEkn42DhdatoBuWTXqcjOtcWwyCCX1axz0F+5r8CBpTwg/NtV26l hxqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 o5-v6si7900822pgn.458.2018.06.29.02.44.38; Fri, 29 Jun 2018 02:44:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933634AbeF2HmY (ORCPT + 99 others); Fri, 29 Jun 2018 03:42:24 -0400 Received: from s3.sipsolutions.net ([144.76.63.242]:33834 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933316AbeF2HmX (ORCPT ); Fri, 29 Jun 2018 03:42:23 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1fYo2v-0007Aq-P6; Fri, 29 Jun 2018 09:42:21 +0200 Message-ID: <1530258140.3481.4.camel@sipsolutions.net> Subject: Re: [PATCH] cfg80211: use IDA to allocate wiphy indeces From: Johannes Berg To: Brian Norris Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Date: Fri, 29 Jun 2018 09:42:20 +0200 In-Reply-To: <20180621012945.185705-1-briannorris@chromium.org> (sfid-20180621_033004_543173_9D94C00F) References: <20180621012945.185705-1-briannorris@chromium.org> (sfid-20180621_033004_543173_9D94C00F) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Brian, On Wed, 2018-06-20 at 18:29 -0700, Brian Norris wrote: > It's annoying to see the phy index increase arbitrarily, just because a > device got removed and re-probed (e.g., during a device reset, or due to > probe testing). We can use the in-kernel index allocator for this, > instead of just an increasing counter. I can understand that it's somewhat annoying to people, but it was actually done on purpose to avoid userspace talking to the wrong device. Imagine you have some userspace process running that has remembered the wiphy index to use it to talk to nl80211, and now underneath the device goes away and reappears. This process should understand that situation, and handle it accordingly, rather than being blind to the reset. johannes