Mellanox NIC interface name subject to change after upgrading from UEK R6 to UEK R7

During a kernel upgrade from UEK R6 to UEK R7, the mlx5_core device name is subject to change, from ens2f0 (UEK R6) to ens2f0np0 (UEK R7).

You might encounter this issue under the following circumstances:

  • When upgrading an Oracle Linux 8 system that is running UEK R6 to UEK R7.

  • When upgrading an Oracle Linux 8 system that is running UEK R6 to Oracle Linux 9 (which ships with UEK R7 by default).

  • When upgrading an Oracle Linux 8 system that is already running UEK R7 to Oracle Linux 9.

    Note:

    In the case where an Oracle Linux 8 system is already running UEK R7, if you previously configured the system to use backwards-compatible device names (ens2f0), you might need to apply the workaround that follows to your GRUB configuration after the upgrade to Oracle Linux 9 has completed.

Note that fresh installations of UEK R7 on Oracle Linux 8 and Oracle Linux 9 use the default naming convention for UEK R7 (enp2s0f0np0) by default.

To retain backwards-compatible (UEK R6) device names for the mlx5_core driver-based network interface card (NIC), perform the following workaround after upgrading to UEK R7, prior to rebooting your system. It is recommended that you back up your existing grub.cfg file before making this change.

  1. Edit the /etc/default/grub file and append the end of the line in the GRUB_CMDLINE_LINUX= module as follows:

    GRUB_CMDLINE_LINUX="console=xxxx mlx5_core.expose_pf_phys_port_name=0"
  2. After editing the file, locate the grub.cfg file on your system, then run the command to update GRUB configuration, as appropriate:

    • On BIOS-based systems, the grub.cfg output/target file is usually located at /boot/grub2/grub.cfg and you would run the following command:

      sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    • On UEFI-based systems, the grub.cfg output/target file could be located at /etc/grub2-efi.cfg or /boot/efi/EFI/redhat/grub.cfg. Depending on the location of the file, you would run one of the following commands:

      sudo grub2-mkconfig -o /etc/grub2-efi.cfg
      sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
  3. Reboot the system for the changes to take effect.

(Bug IDs 34103369, 34145887)