aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorYalei Wang <william.wangyalei@huawei.com>2018-03-14 20:28:30 +0800
committerYalei Wang <william.wangyalei@huawei.com>2018-03-19 10:12:24 +0800
commitbc9d49cc8e1316e3c692e98c582ae5e229ef270c (patch)
treee87c41ff3d050694fbde4c28ef1b0a4546d832b3 /doc
parent3a5bf13c0e7b427b805a372dc1ed1bd5d7759082 (diff)
Update the building document
Change-Id: Ia604fec973bfebe16067ac4167072b0cdd210148 Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/Build_DMM.md86
1 files changed, 45 insertions, 41 deletions
diff --git a/doc/Build_DMM.md b/doc/Build_DMM.md
index be49bd0..abb5313 100644
--- a/doc/Build_DMM.md
+++ b/doc/Build_DMM.md
@@ -1,78 +1,82 @@
-# 1. Introduction :
- This document purpose is to build the DMM.
+# 1. Introduction:
+ This document purpose is to build the DMM and run applications on it.
# 2. Build DPDK:
-DPDK need to be built for DMM RTE dependency.
+ DPDK need to be built first for DMM RTE memory dependency.
- Steps :
- download dpdk-16.04.tar.xz from DPDK release, you can get it from [http://static.dpdk.org/rel](http://static.dpdk.org/rel)
+ Download dpdk-16.04.tar.xz from DPDK release, you can get it from [http://static.dpdk.org/rel](http://static.dpdk.org/rel)
```
- #wget http://static.dpdk.org/rel/dpdk-16.04.tar.xz
- #tar xvf dpdk-16.04.tar.xz
- #vi dpdk-16.04/config/common_base #make CONFIG_RTE_BUILD_SHARED_LIB=y
- #cd dpdk-16.04
- #make install T=x86_64-native-linuxapp-gcc DESTDIR=/root/dpdk_build/tmp2
- #cd x86_64-native-linuxapp-gcc
- #make #to install the dpdk which will generate .so inside lib folder in the path.
+ #wget http://static.dpdk.org/rel/dpdk-16.04.tar.xz
+ #tar xvf dpdk-16.04.tar.xz
+ #vi dpdk-16.04/config/common_base //make CONFIG_RTE_BUILD_SHARED_LIB=y
+ #cd dpdk-16.04
+ #make install T=x86_64-native-linuxapp-gcc DESTDIR=/root/dpdk_build/tmp2
+ #cd x86_64-native-linuxapp-gcc
+ #make //install the dpdk which will generate .so inside lib folder in the path.
```
-Make sure the path same as list up
+
+Note:
+
+ Environment:
+ Linux ubuntu 14.04 or some distro which support dpdk-16.04
+
+# 3. Build DMM:
+
```
- #mkdir -p /root/dpdk_build/tmp2/opt/uvp/evs/
- #cp /root/dpdk/dpdk-16.04/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko /root/dpdk_build/tmp2/opt/uvp/evs/
+ #cd dmm/build
+ #cmake -D DMM_DPDK_INSTALL_DIR=$DPDK_INSTALL_PATH ..
```
+
Note:
- Environment:
- Linux ubuntu 14.04 and above.
- Make sure you have linux-headers-4.4.0-89 linux-headers-4.4.0-89-generic and check uname -a it should have 4.4.0-89-generic header
+ $DPDK_INSTALL_PATH is the path where DPDK has been installed
-- Hugepage setting:
+ After cmake all the makefiles and dependent .sh files will be copied under build directory.
```
- #vi /etc/default/grub
+ #make -j 8
```
-update GRUB\_CMDLINE\_LINUX\_DEFAULT=&quot;default\_hugepagesz=1G hugepagesz=1G hugepages=8&quot;
+ Then we can get libnStackAPI.so
+
+# 4. Env Setting:
+
+- Hugepage setting:
```
+ #vi /etc/default/grub
+ //update GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=1G hugepagesz=1G hugepages=8"
#update-grub
#reboot
```
-Check hugepage info HugePages_
+
+Check hugepage info
+
```
#cat /proc/meminfo
```
-- Mount hugepages:
-```
- #mount -t hugetlbfs -o pagesize=1G none /mnt/nstackhuge/
-```
+- Mount hugepages:
```
+ #mkdir -p /mnt/nstackhuge/
+ #mount -t hugetlbfs -o pagesize=1G none /mnt/nstackhuge/ //only 1G pgsize supported now
#mkdir -p /var/run/ip_module
- #export LD_LIBRARY_PATH=/root/xxxx/DMM/release/lib64/
```
-Note:
- no need LD_PRELOAD, This macro is for the same purpose.
-- Enable detail log of nstack
+# 5. Build and Run the APP
-```
- #export NSTACK_LOG_ON=DBG
-```
+- Link the app with the lib **libnStackAPI.so** first, you can refer to app_example/perf-test
-
-# 3. Build DMM:
+- Enable detail log of nstack by setting env var
```
- #cd DMM/build
- #cmake -D DMM_DPDK_INSTALL_DIR=$DPDK_INSTALL_PATH ..
- #Note: DPDK_INSTALL_PATH - the path in which DPDK has been installed
+ #export NSTACK_LOG_ON=DBG
```
- after cmake all the makefiles and dependent .sh files will be copied under build directory.
-```
- #make -j 8
-```
+- Copy and update the module_config.json, rd_config.json into the same folder of app
+
+- Run your app