-
Notifications
You must be signed in to change notification settings - Fork 153
VMA over Ubuntu 16.04 and inbox driver
This page will help you get VMA installed and running on a clean Ubuntu 16.04 with the inbox drivers coming from Ubuntu.
Meaning, you will not need any additional MLNX_OFED driver besides what you get from Redhat and the latest VMA copy.
Please login as root for the below instructions.
Follow the installation guide from Ubuntu. Make sure Kernel is newer than 4.4. Upgrade if needed.
$ uname -r
4.4.0-2-generic
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus (development branch)"
$ lspci | grep Mellanox
15:00.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
15:00.1 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
1a:00.0 Ethernet controller: Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
1a:00.1 Ethernet controller: Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
Basic drivers for user space access for Ethernet and Infiniband:
$ apt-get install dkms infiniband-diags libibverbs* ibacm librdmacm* libmlx4* libmlx5* mstflint libibcm.* libibmad.* libibumad* opensm srptools libmlx4-dev librdmacm-dev rdmacm-utils ibverbs-utils perftest vlan ibutils
Additional build tools:
$ apt-get install libtool autoconf automake build-essential ibutils ibverbs-utils rdmacm-utils infiniband-diags perftest librdmacm-dev libibverbs-dev libmlx4-1 numactl libnuma-dev autoconf automake gcc g++ git libtool pkg-config
Important! use libnl3:
$ apt-get install libnl-3-200 libnl-route-3-200 libnl-route-3-dev libnl-utils
Do once after install: Add modules to Kernel
$ echo mlx4_ib >> /etc/modules
$ echo ib_umad >> /etc/modules
$ echo ib_cm >> /etc/modules
$ echo ib_ucm >> /etc/modules
$ echo rdma_ucm >> /etc/modules
Load related drivers in system:
$ modprobe mlx4_ib; modprobe ib_umad; modprobe ib_cm; modprobe ib_ucm; modprobe rdma_ucm
Install MFT Tools
$ mst start
Starting MST (Mellanox Software Tools) driver set
Loading MST PCI module - Success
Loading MST PCI configuration module - Success
Create devices
Unloading MST PCI module (unused) - Success
$ mst status
MST modules:
------------
MST PCI module loaded
MST PCI configuration module loaded
MST devices:
------------
/dev/mst/mt4103_pciconf0 - PCI configuration cycles access.
domain:bus:dev.fn=0000:02:00.0 addr.reg=88 data.reg=92
Chip revision is: 00
/dev/mst/mt4103_pci_cr0 - PCI direct access.
domain:bus:dev.fn=0000:02:00.0 bar=0xc7200000 size=0x100000
Chip revision is: 00
$ mlxconfig -d /dev/mst/mt4103_pciconf0 set LINK_TYPE_P1=2 LINK_TYPE_P2=2
$ reboot
$ ibstat
CA 'mlx4_0'
CA type: MT4103
Number of ports: 2
Firmware version: 2.34.5000
Hardware version: 0
Node GUID: 0xe41d2d03001d6690
System image GUID: 0xe41d2d03001d6693
Port 1:
State: Down
Physical state: Polling
Rate: 10
Base lid: 0
LMC: 0
SM lid: 0
Capability mask: 0x02504868
Port GUID: 0xe41d2d03001d6691
Link layer: InfiniBand
Port 2:
State: Down
Physical state: Polling
Rate: 10
Base lid: 0
LMC: 0
SM lid: 0
Capability mask: 0x02504868
Port GUID: 0xe41d2d03001d6692
Link layer: InfiniBand
$ ibv_devinfo
hca_id: mlx4_0
transport: InfiniBand (0)
fw_ver: 2.34.5000
node_guid: e41d:2d03:001d:6690
sys_image_guid: e41d:2d03:001d:6693
vendor_id: 0x02c9
vendor_part_id: 4103
hw_ver: 0x0
board_id: MT_1090111019
phys_port_cnt: 2
port: 1
state: PORT_DOWN (1)
max_mtu: 4096 (5)
active_mtu: 4096 (5)
sm_lid: 0
port_lid: 0
port_lmc: 0x00
link_layer: InfiniBand
port: 2
state: PORT_DOWN (1)
max_mtu: 4096 (5)
active_mtu: 4096 (5)
sm_lid: 0
port_lid: 0
port_lmc: 0x00
link_layer: InfiniBand
$ git clone https://github.com/Mellanox/libvma.git
$ cd libvma
$ ./autogen.sh
$ ./configure --prefix=/usr --libdir=/usr/lib64
$ make -j
$ make install
$ ldconfig
$ echo options mlx4_core log_num_mgm_entry_size=-1 >> /etc/modprobe.d/mlnx.conf
$ modprobe -rv mlx4_en mlx4_ib mlx4_core
$ modprobe -v mlx4_en mlx4_ib mlx4_core rdma_ucm
Configure huge-pages for better libvma performance:
$ echo 1000000000 > /proc/sys/kernel/shmmax
$ echo 800 > /proc/sys/vm/nr_hugepages
Relax memlock restrictions for users allowing more direct memory mapping for HW.
Create file /etc/security/limits.d/rdma.conf with the following:
# configuration for rdma tuning
* soft memlock unlimited
* hard memlock unlimited
# rdma tuning end
Enable new limit for the user.
You will need to logout and back in and then run:
$ ulimit -l unlimited
$ LD_PRELOAD=libvma.so <test_app>
Set cap_net_raw for the executable. For example to use sockperf:
$ setcap cap_net_raw=ep /usr/bin/sockperf
Set special permission for library (SET_UID) and place in standard location (which libvma is now already). These steps are required when using LD_PRELOAD with capabilities set on executable.
$ chmod u+s /usr/lib64/libvma.so.8*