mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, Calvin Owens <calvin@wbinvd.org>
Cc: Ivan Vecera <ivecera@redhat.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	<linux-kernel@vger.kernel.org>,
	"Jedrzej Jagielski" <jedrzej.jagielski@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	<netdev@vger.kernel.org>, <intel-wired-lan@lists.osuosl.org>,
	Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH net] i40e: Prevent unwanted interface name changes
Date: Fri, 22 Aug 2025 13:25:31 -0700	[thread overview]
Message-ID: <68ac693b-57f9-4403-85e9-8ce90d50aeb1@intel.com> (raw)
In-Reply-To: <20250822072326.725475ef@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 3060 bytes --]



On 8/22/2025 7:23 AM, Jakub Kicinski wrote:
> On Thu, 21 Aug 2025 21:23:20 -0700 Calvin Owens wrote:
>>>> If you actually have data on that, obviously that's different. But it
>>>> sounds like you're guessing just like I am.  
>>>
>>> I could only guess about other OS Vendors, one could check it also
>>> for Ubuntu in their public git, but I don't think we need more data, as
>>> ultimate judge here are Stable Maintainers  
>>
>> Maybe I'm barking up the wrong tree, it's udev after all that decides to
>> read the thing in /sys and name the interfaces differently because it's
>> there...
> 
> Yeah, that's my feeling. Ideally there should be a systemd-networkd
> setting that let's user opt out of adding the phys_port_name on
> interfaces. 99% of users will not benefit from these, new drivers or
> old. We're kinda making everyone suffer for the 1% :(

There already is, see my thread here:

From
https://lore.kernel.org/netdev/883ee734-b9bd-42be-b072-23640fd34fdb@intel.com/

> If you want to stop including the "np<N>" to the device names, I believe
> you can set the ID_NET_NAME_ALLOW_PHYS_PORT_NAME=0 via udev properties.
> 
> From what I can tell searching online, this can be done by setting an
> appropriate entry in /etc/udev/hwdb.d/ .. i.e. adding this file:
> 
> /etc/udev/hwdb.d/50-net-naming-disable-phys-port-name.hwdb
> net:naming:*
>   ID_NET_NAME_ALLOW_PHYS_PORT_NAME=0
> 
> after adding this file, you also need to update the hardware database with
> 
> $ systemd-hwdb update
> 
> From here, you should be able to reboot and the physical port name would
> be removed from all devices which have it.
> 
> It appears to work on my test system running Fedora with systemd v256.
> 
> At any rate, this is fully an artifact of how systemd renames things and
> I do not believe we should be working around that by modifying our drivers.
> 

I still stand by this, but I can understand the motivations and accept
the changes to allow opting out of physical port names for the older
devices.

> You're unlikely to convince systemd folks to change defaults, but you
> might be able to convince some distributions to change their defaults.
> Either way, you are best to work around this on your system in whichever
> ways you see fit.

I don't know why systemd changed the default, but that change has been
there for sometime. At least a year or two in Fedora if my memory is
accurate. The fact that the default has changed but gone unnoticed
because it is only triggered by a kernel update is I think part of the
challenge.

We can keep applying this workaround to "legacy" devices so that at
least those ones don't get changed randomly when we add devlink
support... but I think the real problem is ultimately outside of our
control in the hands of the systemd and userspace folks who chose to
change the persistent naming scheme default.

Personally, I agree the extra part of the name is useless for my setups,
and I have since configured all my systems to exclude it.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2025-08-22 20:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  4:29 Calvin Owens
2025-08-20  6:42 ` Michal Schmidt
2025-08-20  9:41   ` Przemek Kitszel
2025-08-20 16:11     ` Calvin Owens
2025-08-20 23:09       ` Calvin Owens
2025-08-20 15:31   ` Calvin Owens
2025-08-20 17:41     ` Calvin Owens
2025-08-21  8:00       ` Przemek Kitszel
2025-08-21 14:23         ` Calvin Owens
2025-08-21 20:39           ` Przemek Kitszel
2025-08-22  4:23             ` Calvin Owens
2025-08-22  6:30               ` [Intel-wired-lan] " Paul Menzel
2025-08-22 14:23               ` Jakub Kicinski
2025-08-22 20:25                 ` Jacob Keller [this message]
2025-08-24 18:59                 ` Calvin Owens
2025-08-20 15:51 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-08-20 23:16   ` Calvin Owens
2025-08-22  6:31 ` Paul Menzel

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=68ac693b-57f9-4403-85e9-8ce90d50aeb1@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=calvin@wbinvd.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=ivecera@redhat.com \
    --cc=jedrzej.jagielski@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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

all inboxes | Powered by JetHome®