From e1dfd3f50f15c3889eccd604424756bb025394eb Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 14 一月 2021 18:27:45 +0800
Subject: [PATCH] update

---
 test_rdma/lr-link-driver-install.mk |   75 +++++++++++++++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/test_rdma/lr-link-driver-install.mk b/test_rdma/lr-link-driver-install.mk
new file mode 100644
index 0000000..87b0296
--- /dev/null
+++ b/test_rdma/lr-link-driver-install.mk
@@ -0,0 +1,75 @@
+## RoCE Configuration for Ubuntu
+
+To configure RoCE on the adapter for an Ubuntu host, RDMA must be installed
+and configured on the Ubuntu host.
+To configure and set up RoCE for Ubuntu 14.04.5/16.04.1 Linux:
+
+1. When you begin installing the Ubuntu server, verify if the basic packages,
+  modules, and tools are available for Ethernet and RDMA. Log in as ROOT,and install all required packages.
+
+	a. Install the basic packages required for Ubuntu:
+    
+    ```bash
+    apt-get install build-essential cmake gcc \
+     pkg-config vlan automake autoconf dkms git  ninja-build  \
+    libudev-dev libnl-3-dev libnl-route-3-dev valgrind python3-dev cython3 python3-docutils pandoc
+    
+    ```
+    b. Install the following RDMA packages required for Ubuntu:
+    ```bash
+	apt-get install 鈥揻 libibverbs* librdma* libibcm.* libibmad.* libibumad*
+  	```
+    
+     Or, Install from source code
+           
+    ```bash
+    git clone	https://github.com/linux-rdma/rdma-core.git
+    ```
+    
+    ```bash
+    [ -d build ] || mkdir build
+    cd build
+    cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release  ..
+    cmake --build .
+    sudo cmake --build . --target install
+     ```
+     
+    c.Install RDMA user space tools and libraries required for Ubuntu:
+    
+    ```bash
+    apt-get install -f libtool ibutils ibverbs-utils \
+    rdmacm-utils infiniband-diags perftest librdmacm-dev \
+    libibverbs-dev numactl libnuma-dev libnl-3-200 \
+    libnl-route-3-200 libnl-route-3-dev libnl-utils 
+    ```
+    
+2. If the file /etc/udev/rules.d/40-rdma.rules does not exist, create it with the following content:
+
+    ```bash
+cat > /etc/udev/rules.d/40-rdma.rules << "EOF"
+KERNEL=="umad*", NAME="infiniband/%k"
+KERNEL=="issm*", NAME="infiniband/%k"
+KERNEL=="ucm*", NAME="infiniband/%k", MODE="0666"
+KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0666"
+KERNEL=="ucma", NAME="infiniband/%k", MODE="0666"
+KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0666"
+EOF
+```
+
+3. Edit the /etc/security/limits.conf file to increase the size of memory, which can be locked by a non-root user. Add the following lines, and then log out:
+
+    ```bash
+    cat >> /etc/security/limits.conf << "EOF"
+    * soft memlock unlimited
+    * hard memlock unlimited
+    root soft memlock unlimited
+    root hard memlock unlimited
+    EOF
+    ```
+4. Log into the system again, or verify after reboot. Then issue the following command:
+ ```bash
+#ulimit -l
+ ```
+You should get the output as `unlimited` .
+
+5. Reboot the system.

--
Gitblit v1.8.0