Remove mlx4.conf

Bug #1693503 reported by Talat Batheesh on 2017-05-25
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kmod (Ubuntu)

Bug Description


we are working on debianizing rdma-core package, it will contain a rdma service that manage the mlx4.conf file, so the conf file “/etc/modprobe.d/mlx4.conf” (that comes with “kmod” package) is not needed anymore, and must be removed.

This conf file conflicts with “/lib/modprobe.d/libmlx4.conf” that will come with “rdma-core” package, and prevents running a script (/sbin/ that configures ConnectX-3 devices port types (IB vs. ETH).


Luke Williams (wililupy) on 2017-06-15
Changed in kmod (Ubuntu):
status: New → Confirmed
Luke Williams (wililupy) on 2017-07-27
Changed in kmod (Ubuntu):
importance: Undecided → High
Luke Williams (wililupy) wrote :

Removing the mlx4.conf from kmod package is not going to cause a regression of bug LP: 1115710?

Talat Batheesh (talat-b87) wrote :

ok, could you please just change the name of the file ?
I will do a tests next week to figure if mlx4_core request the modules mlx_en when the link type is ETh, then we don't need this file at all.


Benjamin Drung (bdrung) wrote :

The kernel will automatically load the mlx4 kernel module which will request to load the mlx4_en and mlx4_ib modules if it detects Ethernet or InfiniBand ports (see mlx4_request_modules() in drivers/net/ethernet/mellanox/mlx4/main.c). So /etc/modprobe.d/mlx4.conf can be dropped from kmod.

Can you please test following:
* Remove /etc/modprobe.d/mlx4.conf
* Update initramfs
* check if mlx4_ib.ko, mlx4_en.ko, and mlx4.ko are in the initrd (use lsinitramfs)
* then do a boot test

Fred Kimmy (kongzizaixian) wrote :

I try to do it but i fail it as following:

ubuntu@ubuntu:~$ sudo update-initramfs -u
[sudo] password for ubuntu:
update-initramfs: Generating /boot/initrd.img-4.10.0-28-generic
WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead.

Zhanglei Mao (zhanglei-mao) wrote :

It seems only warning. Please check if new initrd was created.

Fred Kimmy (kongzizaixian) wrote :

I have confirmed that it will not removed mlx4_en.ko

ubuntu@ubuntu:/boot$ sudo update-initramfs -u
[sudo] password for ubuntu:
update-initramfs: Generating /boot/initrd.img-4.10.0-28-generic
WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead.
ubuntu@ubuntu:/boot$ lsinitramfs initrd.img-4.10.0-28-generic | grep mlx4_en.ko
ubuntu@ubuntu:/boot$ lsinitramfs initrd.img | grep mlx4_en.ko
ubuntu@ubuntu:/etc/modprobe.d$ ls
blacklist-ath_pci.conf blacklist-framebuffer.conf iwlwifi.conf
blacklist.conf blacklist-rare-network.conf mdadm.conf
blacklist-firewire.conf blacklist-watchdog.conf mlx4.conf-bak

Benjamin Drung (bdrung) wrote :

Okay, the content of the initramfs looks good. Now it is time to test if the mlx4_en kernel module is loaded when the hardware is present. Can you boot the system and check with "lsmod | grep mlx4" that the module is loaded?

Fred Kimmy (kongzizaixian) wrote :

this module is not loaded but this install also will fail it.

ubuntu@ubuntu:/etc/modprobe.d$ lsmod | grep mlx4
ubuntu@ubuntu:/etc/modprobe.d$ sudo apt install rdma-core
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/54.5 kB of archives.
After this operation, 188 kB of additional disk space will be used.
(Reading database ... 69999 files and directories currently installed.)
Preparing to unpack .../rdma-core_16.0-1_arm64.deb ...
Unpacking rdma-core (16.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/rdma-core_16.0-1_arm64.deb (--unpack):
 trying to overwrite '/etc/modprobe.d/mlx4.conf', which is also in package kmod 24-1ubuntu2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Benjamin Drung (bdrung) wrote :

So dpkg does not care if you have removed the config file. I prepared an update kmod package that removes /etc/modprobe.d/mlx4.conf in my PPA. Please update to the kmod version in my PPA and then you can install rdma-core without conflicts:

Benjamin Drung (bdrung) wrote :

Fred, do you have a Mellanox card? The kernel should load mlx4_core automatically when it detects the hardware. Then the mlx4.conf file ensures that mlx4_en is loaded when mlx4_core was loaded.

Fred Kimmy (kongzizaixian) wrote :

I fail to install this ppa as follow:

ubuntu@ubuntu:~$ sudo add-apt-repository ppa:bdrung/ppa
Cannot add PPA: 'ppa:~bdrung/ubuntu/ppa'.
ERROR: '~bdrung' user or team does not exist.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kmod - 24-1ubuntu3

kmod (24-1ubuntu3) bionic; urgency=medium

  * Remove /etc/modprobe.d/mlx4.conf: The kernel module mlx4_core will
    automatically load the mlx4_en/mlx4_ib modules (LP: #1693503)

 -- Benjamin Drung <email address hidden> Sun, 28 Jan 2018 16:34:49 +0100

Changed in kmod (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers