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/[email protected]/

> 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: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to