public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Shenwei Wang <shenwei.wang@nxp.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
	Wei Fang <wei.fang@nxp.com>, Clark Wang <xiaoning.wang@nxp.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>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH net-next] net: enetc: Support ethernet aliases in dts.
Date: Wed, 26 Feb 2025 19:10:45 +0200	[thread overview]
Message-ID: <20250226171045.kf7dd2zprpcjrnj7@skbuf> (raw)
In-Reply-To: <AS8PR04MB91761FDBD0170D8773395E9289C22@AS8PR04MB9176.eurprd04.prod.outlook.com>

On Wed, Feb 26, 2025 at 06:46:54PM +0200, Shenwei Wang wrote:
> > Shenwei, you don't want the kernel to attempt to be very smart about the initial
> > netdev naming. You will inevitably run into the situation where "eth%d" is already
> > the name chosen for the kernel for a different net_device without a predictable
> > name (e.g. e1000e PCIe card) which has been allocated already. Then you'll want
> 
> The driver just provides an option to configure predictable interface naming. IMO, all 
> those kind of naming conflicts should be managed by the DTS itself. 

Good luck adding of_alias_get_id() patches to (and others) PCIe NIC
drivers (with a real PCIe link layer, not Enhanced Allocation).

> > to fix that somehow, and the stream of patches will never stop, because the
> > kernel will never be able to fulfill all requirements. Look at the udev naming rules
> > for dpaa2 and enetc on Layerscape and build something like that. DSA switch
> 
> Even with the udev/systemd solution, you may still need to resolve the naming
> conflict sometimes among multiple cards.

Yet, the rootfs seems to be the only place to keep net device names that
is sufficiently flexible to cover the variability in use cases. Maybe
you're used to your developer position where you can immediately modify
the device tree for a board, but one is supposed to be able to configure
U-Boot to provide a fixed device tree (its own) to Linux. This is for
example used for Arm SystemReady IR compliance with distributions, to my
knowledge.

  reply	other threads:[~2025-02-26 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 21:44 [PATCH net-next] net: enetc: Support ethernet aliases in dts Shenwei Wang
2025-02-26 14:57 ` Andrew Lunn
2025-02-26 15:07   ` Shenwei Wang
2025-02-26 15:10     ` Vladimir Oltean
2025-02-26 15:47 ` Vladimir Oltean
2025-02-26 16:46   ` Shenwei Wang
2025-02-26 17:10     ` Vladimir Oltean [this message]
2025-02-26 17:43       ` Shenwei Wang
2025-02-26 20:02         ` Vladimir Oltean

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=20250226171045.kf7dd2zprpcjrnj7@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /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