From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8FAA2DC359 for ; Thu, 24 Jul 2025 13:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753365381; cv=none; b=jn4OrtXvABhwqKsj1T7Ik1bKWXFGee7TTZUvNNylAkl0dsDCNNqQGrhy2wdCCIrhanFto0QSxrJu07RyXgrBpveWe9rtW1nvDYy+sx+SMu4Z0BFVPot3vVUWIARijXYYV1T69UML8NdSQ4xiuCfityq27pf1NS6FnhxqC39gOvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753365381; c=relaxed/simple; bh=9y7t1P4tvOdzFMOWceniFW8wFyn3duqWiK+tb2TQtTk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PVdmeEKwH2Rh4SDQ99/d8feKbaQoknBxX90PLPbNQ9bpAXNGGCxhpGfmvj/ZjEKIWYSrNWu426dZzi+2K10Q8L/GeTZhiIjWWxLAQ7vTr8grcInR4Xl+vyUWW4ZP0xPqpLpaoeKJDkrF27auVZjuxGMmQjd4tb0GXJO8DxhwLew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=xDuFrqtb; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="xDuFrqtb" Message-ID: <991cbb9a-a1b5-4ab8-9deb-9ecea203ce0f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1753365364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=THb9OA/TiR1XzVuDY0Y6uYlj9r+f68Q+8bbXSQessY8=; b=xDuFrqtbleTFYgMfG/+dzmiNOf9WfMjEIQ+vyWpBK7H0ruFRSJm9fUTbxjbSvdfuMKPNup r1xVULgxavPiqQwoeGmwnAxOGIs91rie3H09SadgDcQYy9/1R/Wnlc/3Y3qQuo9RgbGV/3 CY27SJIBzQmoYxre91whlvlQd+hSBpE= Date: Thu, 24 Jul 2025 09:55:59 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v2 1/4] auxiliary: Support hexadecimal ids To: Leon Romanovsky Cc: Greg Kroah-Hartman , 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 References: <2025071637-doubling-subject-25de@gregkh> <719ff2ee-67e3-4df1-9cec-2d9587c681be@linux.dev> <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> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <20250723081356.GM402218@unreal> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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. --Sean