From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DACEFC87FCF for ; Fri, 25 Jul 2025 05:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ComV7yTmfwQTTvo3gRdvvmDbkDXcM3jd/yfZXbHLHkM=; b=4Ml6Axsohep8BdPkbiaCfetNZ5 LrbzhJXdh1Va7f1mt05ULSdq3DQJluzaXNpY9QtH7j+d/6jM6/lu7379U/+/7coed4LQ5VGVGa2DK E9HXZmcSt+CipzyigiuitRCmsnlSnJIfeWqen8HV+b9L5bZdG0kaMb8E3oy/9XG27fP9/TZ8+17g+ 2er2DfuIRiFoOs8q1k4+DNVL17tDBzMXdbe1HtM4futdqxyEhIAz6UiQtAhPVMjp5F/EMAsy5fFfN 9n136Am20SnBmyjXOUzd1CiJziqx7zRVT8TUHyBHBQ9nai9WfK5bRFIeqfCUfL8mWQDShA9r2YpMj rmj650aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ufAcA-000000093kA-1dYR; Fri, 25 Jul 2025 05:05:02 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ufAZi-0000000932Y-3dcH for linux-arm-kernel@lists.infradead.org; Fri, 25 Jul 2025 05:02:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1CF95A52938; Fri, 25 Jul 2025 05:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE946C4CEF5; Fri, 25 Jul 2025 05:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753419748; bh=wDByJ5uADwgkr25ymazjxmukAUNM4cHMm2vqVskCphs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wd4dLo2T/szStSn24bnGbyUfbKYvCzTtBhtlaBgG7nKRFlbJSpb5YnW6oueFA2dru zyeLW8XIbPSGsNHy7n5zXia/QW5opr+BGL7nTRfLLH8G4I0E260fQLZT6DWu01pDlf xc9C6Bn/lr0zX4ebXSdvxn2khOHREMigrJ1vq4A0= Date: Fri, 25 Jul 2025 07:02:24 +0200 From: Greg Kroah-Hartman To: Sean Anderson Cc: Leon Romanovsky , Radhey Shyam Pandey , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Dave Ertman , Saravana Kannan , linux-kernel@vger.kernel.org, Michal Simek , linux-arm-kernel@lists.infradead.org, Ira Weiny Subject: Re: [PATCH net v2 1/4] auxiliary: Support hexadecimal ids Message-ID: <2025072543-senate-hush-573d@gregkh> References: <2025071747-icing-issuing-b62a@gregkh> <5d8205e1-b384-446b-822a-b5737ea7bd6c@linux.dev> <2025071736-viscous-entertain-ff6c@gregkh> <03e04d98-e5eb-41c0-8407-23cccd578dbe@linux.dev> <2025071726-ramp-friend-a3e5@gregkh> <5ee4bac4-957b-481a-8608-15886da458c2@linux.dev> <20250720081705.GE402218@unreal> <20250723081356.GM402218@unreal> <991cbb9a-a1b5-4ab8-9deb-9ecea203ce0f@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <991cbb9a-a1b5-4ab8-9deb-9ecea203ce0f@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250724_220231_035144_B7ECEF5B X-CRM114-Status: GOOD ( 23.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 24, 2025 at 09:55:59AM -0400, Sean Anderson wrote: > On 7/23/25 04:13, Leon Romanovsky wrote: > > On Mon, Jul 21, 2025 at 10:29:32AM -0400, Sean Anderson wrote: > >> On 7/20/25 04:17, Leon Romanovsky wrote: > >> > On Thu, Jul 17, 2025 at 01:12:08PM -0400, Sean Anderson wrote: > >> >> On 7/17/25 12:33, Greg Kroah-Hartman wrote: > >> > > >> > <...> > >> > > >> >> Anyway, if you really think ids should be random or whatever, why not > >> >> just ida_alloc one in axiliary_device_init and ignore whatever's > >> >> provided? I'd say around half the auxiliary drivers just use 0 (or some > >> >> other constant), which is just as deterministic as using the device > >> >> address. > >> > > >> > I would say that auxiliary bus is not right fit for such devices. This > >> > bus was introduced for more complex devices, like the one who has their > >> > own ida_alloc logic. > >> > >> I'd say that around 2/3 of the auxiliary drivers that have non-constant > >> ids use ida_alloc solely for the auxiliary bus and for no other purpose. > >> I don't think that's the kind of complexity you're referring to. > >> > >> >> Another third use ida_alloc (or xa_alloc) so all that could be > >> >> removed. > >> > > >> > These ID numbers need to be per-device. > >> > >> Why? They are arbitrary with no semantic meaning, right? > > > > Yes, officially there is no meaning, and this is how we would like to > > keep it. > > > > Right now, they are very correlated with with their respective PCI function number. > > Is it important? No, however it doesn't mean that we should proactively harm user > > experience just because we can do it. > > > > [leonro@c ~]$ l /sys/bus/auxiliary/devices/ > > ,,, > > rwxrwxrwx 1 root root 0 Jul 21 15:25 mlx5_core.rdma.0 -> ../../../devices/pci0000:00/0000:00:02.7/0000:0 > > 8:00.0/mlx5_core.rdma.0 > > lrwxrwxrwx 1 root root 0 Jul 21 15:25 mlx5_core.rdma.1 -> ../../../devices/pci0000:00/0000:00:02.7/0000:0 > > 8:00.1/mlx5_core.rdma > > Well, I would certainly like to have semantic meaning for ids. But apparently > that is only allowed if you can sneak it past the review process. Do I need to dust off my "make all ids random" patch again and actually merge it just to prevent this from happening? greg k-h