HowTo Install MLNX_OFED Driver

Version 4

    There are several ways through which MLNX_OFED driver can be installed. One of these ways is by using wget to get the tgz image, extract it and install MLNX_OFED.

     

    References

     

    Configuration

     

    1. Get the MLNX_OFED version from the Mellanox web (click here), or run wget (make sure there is an available version of MLNX_OFED for the specific distribution). Use the following format:

    # wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-<version>/MLNX_OFED_LINUX-<version>-<distribution>-<arch>.tgz .

     

    For example, for MLNX_OFED v3.4-2.x.x.x, RHEL7.2 and x86 CPU arch, use:

    # wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-3.4-2.0.0.0/MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.2-x86_64.tgz .

     

    2. Untar and install.

     

    # tar -xvf MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.2-x86_64.tgz

    ...

    # cd MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.2-x86_64/

     

    # ./mlnxofedinstall  [options]    <---- Note: Before you install MLNX_OFED review the various of installation options

                                      <---- E.g. use --add-kernel-support flag in case the kernel is not aligned with the inbox kernel (use -h) . See below

     

    3. Restart the driver.

    # /etc/init.d/openibd restart

     

    Notes and Troubleshooting

    • In case you are using a different kernel, use the installation flag --add-kernel-support.

     

    • You may be requested to add or remove kernel modules while installing MLNX_OFED.

     

    For example:

    ./mlnxofedinstall --add-kernel-support

     

    rpm --nosignature -e --allmatches --nodeps rdma

    Note: This program will create MLNX_OFED_LINUX TGZ for rhel7.2 under /tmp/MLNX_OFED_LINUX-3.4-2.0.0.0-4.8.7 directory.

    See log file /tmp/MLNX_OFED_LINUX-3.4-2.0.0.0-4.8.7/mlnx_ofed_iso.8834.log

     

    Checking if all needed packages are installed...

     

    Error: One or more required packages for installing OFED-internal are missing.

    Please install the missing packages using your Linux distribution Package Management tool.

    Run:

    yum install python-devel

    Failed to build MLNX_OFED_LINUX for 4.8.7

     

    To solve this issue, install or remove the required modules.

    # yum remove libibumad libibverbs-devel libibverbs libmlx5 libibverbs-utils
    # yum install python-devel
    ...

     

    • Use the -h flag to get all the available options for the installation:

    # ./mlnxofedinstall -h

     

     

    Usage: ./mlnxofedinstall [OPTIONS]

     

     

    Options

               -c|--config <packages config_file>                 Example of the configuration file

                                                                  can be found under docs

               -n|--net <network config_file>                     Example of the network configuration file can be found under docs

               -k|--kernel <kernel version>                       Use provided kernel version instead of 'uname -r'

               -s|--kernel-sources <path to the kernel sources>   Default on this system: /lib/modules/4.8.7/build

               -p|--print-available                               Print available packages for current platform

                                                                  And create corresponding ofed.conf file

               -U|--update                                        Update installed version.

               --with-32bit                                       Install 32-bit libraries

               --without-32bit                                    Skip 32-bit libraries installation (Default)

               --without-depcheck                                 Skip Distro's libraries check

               --check-deps-only                                  Check Linux dependencies and exit.

               --distro                                           Set Distro name for the running OS (e.g: rhel6.5, sles11sp3). Default: Use auto-detection.

               --without-fw-update                                Skip firmware update

               --fw-update-only                                   Update firmware. Skip driver installation

               --force-fw-update                                  Force firmware update

               --force                                            Force installation

               --tmpdir                                           Change tmp directory. Default: /tmp

               --all|--hpc|--basic|--msm                          Install all, hpc, basic or Mellanox Subnet manager packages correspondingly

               --kernel-only                                      Install kernel space packages only

               --dpdk                                             Install packages required for DPDK

               --vma|--vma-vpi                                    Install packages required by VMA to support VPI

               --vma-eth                                          Install packages required by VMA to work over Ethernet

               --with-vma                                         Set configuration for VMA use (to be used with any installation parameter).

               --guest                                            Install packages required by guest os

               --hypervisor                                       Install packages required by hypervisor os

               --user-space-only                                  Filter selected packages and install only User space packages

               -v|-vv|-vvv                                        Set verbosity level

               --umad-dev-rw                                      Grant non root users read/write permission for umad devices instead of default

               --umad-dev-na                                      Prevent from non root users read/write access for umad devices. Overrides '--umad-dev-rw'

               --enable-affinity                                  Run mlnx_affinity script upon boot

               --disable-affinity                                 Disable mlnx_affinity script (Default)

               --enable-mlnx_tune                                 Enable Running the mlnx_tune utility

               --add-kernel-support                               Add kernel support (Run mlnx_add_kernel_support.sh)

               --kmp                                              Install kernel RPMs with KMP support if available

                                                                  - Enabled by default with official MLNX_OFED_LINUX releases.

                                                                  - Disabled by default if new MLNX_OFED_LINUX was created with mlnx_add_kernel_support.sh

                                                                  - Passing it along with --add-kernel-support will pass --kmp to mlnx_add_kernel_support.sh

               --disable-kmp                                      Install kernel RPMs without KMP support if available

                                                                  - Enabled by default if new MLNX_OFED_LINUX was created with mlnx_add_kernel_support.sh

               --skip-kmp-verify                                  Do not check if the KMP rpms are compatiable with the target kernel.

               --post-start-delay <sec>                           Set openibd POST_START_DELAY parameter in seconds. (Default 0)

               --skip-distro-check                                Do not check MLNX_OFED_LINUX vs Distro matching

               -q                                                 Set quiet - no messages will be printed

               --without-<package>                                Do not install package

               --with-<package>                                   Force installing package

               --with-fabric-collector                            Install fabric-collector package.

               --pre-install-<package>  <path to script>          Run given script before given package's install.

               --post-install-<package> <path to script>          Run given script after given package's install.