Why is the interface names changing?

Using Ubuntu 18.04 and their kernels the interface name comes up as enp2s0f0.

When installing the mlnx-en-dkms package (version 5.2- driver provided by mellanox the interface name comes up as enp2s0f0np0

How can I prevent / preserve the name change between reboots / reloading the mlx5_core kernel module? Is there a single udev rule that will keep the name the same where I don’t have to specify a specific rule for each mellanox mac?

Or is systemd causing this some how?


Please refer to the below section in MLNX_OFED UM for PersistentNaming




Sure that works but I’m looking for a rule a little more dynamic without needing to know the mac adddress of each interface. Really just want it to match the name scheme that the in kernel driver uses.

what is the “np” part of new interface name mean/referrs?