From: Leon Romanovsky <leon@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sean Anderson <sean.anderson@linux.dev>
Cc: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Dave Ertman <david.m.ertman@intel.com>,
Saravana Kannan <saravanak@google.com>,
linux-kernel@vger.kernel.org, Michal Simek <michal.simek@amd.com>,
linux-arm-kernel@lists.infradead.org,
Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH net v2 1/4] auxiliary: Support hexadecimal ids
Date: Sun, 27 Jul 2025 14:39:03 +0300 [thread overview]
Message-ID: <20250727113903.GA402218@unreal> (raw)
In-Reply-To: <2025072751-living-sheath-e601@gregkh>
On Sun, Jul 27, 2025 at 10:57:09AM +0200, Greg Kroah-Hartman wrote:
> On Sun, Jul 27, 2025 at 11:07:05AM +0300, Leon Romanovsky wrote:
> > On Fri, Jul 25, 2025 at 07:02:24AM +0200, Greg Kroah-Hartman wrote:
> > > 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?
> >
> > After weekend thoughts on it. IDs need to be removed from the driver
> > access. Let's make them global at least.
>
> Great, no objection from me, want to send a patch we can queue up for
> 6.18-rc1?
Sean proposed the initial idea to move IDs to aux core. Let's wait for him
to see if he wants to do such patch. If not, I'll send.
Thanks
next prev parent reply other threads:[~2025-07-27 11:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 0:01 [PATCH net v2 0/4] net: axienet: Fix deferred probe loop Sean Anderson
2025-07-16 0:01 ` [PATCH net v2 1/4] auxiliary: Support hexadecimal ids Sean Anderson
2025-07-16 5:09 ` Greg Kroah-Hartman
2025-07-17 15:49 ` Sean Anderson
2025-07-17 15:59 ` Greg Kroah-Hartman
2025-07-17 16:04 ` Sean Anderson
2025-07-17 16:21 ` Greg Kroah-Hartman
2025-07-17 16:27 ` Sean Anderson
2025-07-17 16:33 ` Greg Kroah-Hartman
2025-07-17 17:12 ` Sean Anderson
2025-07-20 8:17 ` Leon Romanovsky
2025-07-21 14:29 ` Sean Anderson
2025-07-23 8:13 ` Leon Romanovsky
2025-07-24 13:55 ` Sean Anderson
2025-07-25 5:02 ` Greg Kroah-Hartman
2025-07-27 8:07 ` Leon Romanovsky
2025-07-27 8:57 ` Greg Kroah-Hartman
2025-07-27 11:39 ` Leon Romanovsky [this message]
2025-07-16 0:01 ` [PATCH net v2 2/4] net: axienet: Fix resource release ordering Sean Anderson
2025-07-16 0:01 ` [PATCH net v2 3/4] net: axienet: Rearrange lifetime functions Sean Anderson
2025-07-16 0:01 ` [PATCH net v2 4/4] net: axienet: Split into MAC and MDIO drivers Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250727113903.GA402218@unreal \
--to=leon@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=saravanak@google.com \
--cc=sean.anderson@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).