From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: Josua Mayer <josua@solid-run.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH RFC] net: sfp: support assigning status LEDs to SFP connectors
Date: Wed, 11 May 2022 14:39:23 +0100 [thread overview]
Message-ID: <Ynu8ixB5cm3zy6Yx@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220511132221.pkvi3g7agjm2xuph@skbuf>
On Wed, May 11, 2022 at 01:22:22PM +0000, Ioana Ciornei wrote:
> On Tue, May 10, 2022 at 12:44:41PM +0300, Josua Mayer wrote:
>
> > One issue is that the interfaces don't have stable names. It purely depends
> > on probe order,
> > which is controlled by sending commands to the networking coprocessor.
> >
> > We actually get asked this question sometimes how to have stable device
> > names, and so far the answer has been systemd services with explicit sleep
> > to force the order.
> > But this is a different topic.
> >
>
> Stable names can be achieved using some udev rules based on the OF node.
> For example, I am using the following rules on a Clearfog CX LX2:
>
> [root@clearfog-cx-lx2 ~] # cat /etc/udev/rules.d/70-persistent-net.rules
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@7", NAME="eth7"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@8", NAME="eth8"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@9", NAME="eth9"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@a", NAME="eth10"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", ENV{OF_FULLNAME}=="/soc/fsl-mc@80c000000/dpmacs/ethernet@11", NAME="eth17"
Or by using systemd - for example, on the Armada 38x Clearfog platform,
I use:
/etc/systemd/network/01-ded.link:
[Match]
Path=platform-f1070000.ethernet
[Link]
MACAddressPolicy=none
Name=eno0
/etc/systemd/network/02-sw.link:
[Match]
Path=platform-f1030000.ethernet
[Link]
MACAddressPolicy=none
Name=eno1
/etc/systemd/network/03-sfp.link:
[Match]
Path=platform-f1034000.ethernet
[Link]
MACAddressPolicy=none
Name=eno2
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-05-11 13:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 12:29 [PATCH RFC] net: sfp: support assigning status LEDs to SFP connectors Josua Mayer
2022-05-09 12:49 ` Andrew Lunn
2022-05-10 8:56 ` Josua Mayer
2022-05-10 12:13 ` Andrew Lunn
2022-05-11 10:26 ` Russell King (Oracle)
2022-05-11 14:48 ` Ioana Ciornei
2022-05-11 10:12 ` Russell King (Oracle)
2022-05-11 15:48 ` Ioana Ciornei
2022-05-18 7:42 ` Josua Mayer
2022-05-09 15:54 ` Russell King (Oracle)
2022-05-10 9:44 ` Josua Mayer
2022-05-11 10:21 ` Russell King (Oracle)
2022-05-11 13:22 ` Ioana Ciornei
2022-05-11 13:39 ` Russell King (Oracle) [this message]
2022-06-01 10:18 ` Josua Mayer
2022-06-01 10:52 ` Russell King (Oracle)
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=Ynu8ixB5cm3zy6Yx@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=josua@solid-run.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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).