aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/Build_DMM.md25
-rw-r--r--resources/extras/Vagrantfile3
-rwxr-xr-xscripts/build.sh52
3 files changed, 61 insertions, 19 deletions
diff --git a/doc/Build_DMM.md b/doc/Build_DMM.md
index 8eee84a..5cc3331 100644
--- a/doc/Build_DMM.md
+++ b/doc/Build_DMM.md
@@ -24,7 +24,7 @@ Note:
Note:
Environment:
- Linux ubuntu 14.04 or some distro which support dpdk-16.04
+ Linux ubuntu 16.04 or some distro which support dpdk-16.04
# 3. Build DMM:
@@ -45,7 +45,26 @@ Note:
For centos we can use the command 'make pkg-rpm' to generate the rpm package in release/rpm.
-# 4. Env Setting:
+# 4. Build rsocket:
+
+```
+ #cd $(DMM_DIR)/build
+ #make dmm_rsocket
+```
+Note:
+ Make sure Mellanox OFED has been installed in your computer, or run the following command before compiling
+
+```
+ #cd $DMM_DIR/stacks/rsocket
+ //Take ubuntu16.04 as an example, the tgz file has the format MLNX_OFED_LINUX-<ver>-<OS label><CPU arch>.tgz
+ #wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ #tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ #cd MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64
+ #./mlnxofedinstall --force
+```
+
+
+# 5. Env Setting:
- Hugepage setting:
@@ -69,7 +88,7 @@ Check hugepage info
```
-# 5. Build and Run the APP
+# 6. Biuld and Run the APP
- Link the app with the lib **libnStackAPI.so** first, you can refer to app_example/perf-test
diff --git a/resources/extras/Vagrantfile b/resources/extras/Vagrantfile
index c3107c9..969c91f 100644
--- a/resources/extras/Vagrantfile
+++ b/resources/extras/Vagrantfile
@@ -8,7 +8,8 @@ Vagrant.configure(2) do |config|
if distro == 'centos7'
config.vm.box = "puppetlabs/centos-7.2-64-nocm"
else
- config.vm.box = "fdio-csit/ubuntu-14.04.4_2016-05-25_1.0"
+ #config.vm.box = "fdio-csit/ubuntu-14.04.4_2016-05-25_1.0"
+ config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"
end
config.vm.box_check_update = false
diff --git a/scripts/build.sh b/scripts/build.sh
index 926f3b0..a887f9f 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -63,7 +63,7 @@ if [ "$OS_ID" == "ubuntu" ]; then
APT_OPTS="--assume-yes --no-install-suggests --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\""
sudo apt-get update ${APT_OPTS}
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim pkg-config tcl libnl-route-3-200 flex graphviz tk debhelper dpatch gfortran ethtool libgfortran3 bison dkms quilt chrpath swig python-libxml2
elif [ "$OS_ID" == "debian" ]; then
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
@@ -72,7 +72,7 @@ elif [ "$OS_ID" == "debian" ]; then
sudo apt-get update ${APT_OPTS}
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim
elif [ "$OS_ID" == "centos" ]; then
- sudo yum install -y git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel
+ sudo yum install -y deltarpm git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel libiverbs tk tcl tcsh
elif [ "$OS_ID" == "opensuse" ]; then
sudo yum install -y git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel
fi
@@ -126,12 +126,11 @@ rm -rf *
cmake ..
make -j 8
-if [ $? -eq 0 ]
-then
- echo "DMM build is SUCCESS"
+if [ $? -eq 0 ]; then
+ echo "DMM build is SUCCESS"
else
- echo "DMM build has FAILED"
- exit 1
+ echo "DMM build has FAILED"
+ exit 1
fi
if [ "$OS_ID" == "centos" ]; then
@@ -154,20 +153,20 @@ fi
hugepageTotal=$(cat /proc/meminfo | grep -c "HugePages_Total: 0")
if [ $hugepageTotal -ne 0 ]; then
- echo "HugePages_Total is zero"
- exit
+ echo "HugePages_Total is zero"
+ exit
fi
hugepageFree=$(cat /proc/meminfo | grep -c "HugePages_Free: 0")
if [ $hugepageFree -ne 0 ]; then
- echo "HugePages_Free is zero"
- exit
+ echo "HugePages_Free is zero"
+ exit
fi
hugepageSize=$(cat /proc/meminfo | grep -c "Hugepagesize: 0 kB")
if [ $hugepageSize -ne 0 ]; then
- echo "Hugepagesize is zero"
- exit
+ echo "Hugepagesize is zero"
+ exit
fi
sudo mkdir /mnt/nstackhuge -p
@@ -188,9 +187,9 @@ mkdir -p $DMM_DIR/config/app_test
cd $DMM_DIR/config/app_test
if [ "$OS_ID" == "ubuntu" ]; then
- ifaddress1=$(ifconfig eth1 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
+ ifaddress1=$(ifconfig enp0s8 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
echo $ifaddress1
- ifaddress2=$(ifconfig eth2 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
+ ifaddress2=$(ifconfig enp0s9 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
echo $ifaddress2
elif [ "$OS_ID" == "centos" ]; then
ifaddress1=$(ifconfig enp0s8 | grep 'inet' | cut -d: -f2 | awk '{print $2}')
@@ -240,3 +239,26 @@ echo '{
}' | tee rd_config.json
echo "DMM build finished....."
+
+############### build rsocket
+echo "rsocket build start"
+cd $DMM_DIR/stacks/rsocket
+if [ "$OS_ID" == "ubuntu" ]; then
+ wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ cd MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64
+elif [ "$OS_ID" == "centos" ]; then
+ wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz
+ tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz
+ cd MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64
+fi
+./mlnxofedinstall --force
+cd $BUILD_DIR
+make dmm_rsocket
+if [ $? -eq 0 ]; then
+ echo "rsocket build has SUCCESS"
+else
+ echo "rsocket build has FAILED"
+ exit 1
+fi
+echo "rsocket build finished"