打开Mellanox官网下载驱动Linux InfiniBand Drivers

点击下载链接跳转至

Tgz解压缩执行 ./mlnxofedinstall发现缺少模块

# ./mlnxofedinstall Logs dir: /tmp/MLNX_OFED_LINUX.11337.logsGeneral log file: /tmp/MLNX_OFED_LINUX.11337.logs/general.logVerifying KMP rpms compatibility with target kernel...Error: One or more required packages for installing MLNX_OFED_LINUX are missing.Please install the missing packages using your Linux distribution Package Management tool.Run:yum install kernel-modules-extra tk

先安装 kernel modules

# yum install kernel-modules-extra tk

再安装OFED

# ./mlnxofedinstall Logs dir: /tmp/MLNX_OFED_LINUX.33933.logsGeneral log file: /tmp/MLNX_OFED_LINUX.33933.logs/general.logVerifying KMP rpms compatibility with target kernel...This program will install the MLNX_OFED_LINUX package on your machine.Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.Those packages are removed due to conflicts with MLNX_OFED_LINUX, do not reinstall them.Do you want to continue" /># echo 6 > /sys/class/infiniband/mlx5_0/device/mlx5_num_vfs 

VF生成成功了

# lspci -nn|grep Mellanox0000:2f:00.0 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6] [15b3:101b]0000:2f:00.1 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6] [15b3:101b]0000:2f:00.2 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]0000:2f:00.3 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]0000:2f:00.4 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]0000:2f:00.5 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]0000:2f:00.6 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]0000:2f:00.7 Ethernet controller [0200]: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [15b3:101c]# ip linklink/ether b4:96:91:bf:94:94 brd ff:ff:ff:ff:ff:ff16: ens1f0np0:  mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000link/ether b8:3f:d2:d3:e4:c6 brd ff:ff:ff:ff:ff:ffvf 0 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss offvf 1 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss offvf 2 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss offvf 3 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss offvf 4 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss offvf 5 MAC 00:00:00:00:00:00, spoof checking off, link-state auto, trust off, query_rss off