1 #########################################################################
3 # Copyright (c) 2018 Huawei Technologies Co.,Ltd.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #########################################################################
18 #Note: build path /root/dpdk/ , install path /root/dpdk_install/tmp
19 ===================================================================
20 if [ -d /root/dpdk_install/tmp ]; then
21 rm -rf /root/dpdk_install/tmp
28 wget https://fast.dpdk.org/rel/dpdk-16.04.tar.xz
29 tar xvf dpdk-16.04.tar.xz
32 sed -i 's!CONFIG_RTE_EXEC_ENV=.*!CONFIG_RTE_EXEC_ENV=y!1' config/common_base
33 sed -i 's!CONFIG_RTE_BUILD_SHARED_LIB=.*!CONFIG_RTE_BUILD_SHARED_LIB=y!1' config/common_base
34 sed -i 's!CONFIG_RTE_LIBRTE_EAL=.*!CONFIG_RTE_LIBRTE_EAL=y!1' config/common_base
36 make install T=x86_64-native-linuxapp-gcc DESTDIR=/root/dpdk_install/tmp
37 cd x86_64-native-linuxapp-gcc
40 cp -r /root/dpdk/dpdk-16.04/tools/dpdk_nic_bind.py /root/dpdk/dpdk-16.04/tools/dpdk-devbind.py
42 mount -t hugetlbfs -o pagesize=1G none /mnt/nstackhuge/
43 mkdir /var/run/ip_module
45 #verify hugepages 8GB free hugepages are required
46 =================================================
53 cd thirdparty/glog/glog-0.3.4/
64 cd ../thirdparty/glog/glog-0.3.4/
68 cd ../stacks/lwip_stack/build/
76 chmod +x release_tar.sh
79 tar -zxf nStackServer.tar.gz
82 cp configure/*.json bin/
84 ##make json file changes
85 #I have copied the working configs in the path /home/sharath/working_config/
88 cp -r /home/sharath/working_config/server/ip_data.json bin/
89 cp -r /home/sharath/working_config/server/network_data_tonStack.json bin/
90 cp -r /home/sharath/working_config/server/nStackConfig.json bin/
93 cp -r /home/sharath/working_config/client/ip_data.json bin/
94 cp -r /home/sharath/working_config/client/network_data_tonStack.json bin/
95 cp -r /home/sharath/working_config/client/nStackConfig.json bin/
97 #dpdk download path : /root/dpdk/dpdk-16.04/
98 sed -i 's!export DPDK_INSTALL_PATH.*!export DPDK_INSTALL_PATH="/root/dpdk/dpdk-16.04"!1' ../release/script/nstack_var.sh
100 cd ../../../release/bin/
101 cp ../configure/*.json .
104 cp -r /home/sharath/working_config/server/module_config.json .
105 cp -r /home/sharath/working_config/server/nStackConfig.json .
106 cp -r /home/sharath/working_config/server/rd_config.json .
109 cp -r /home/sharath/working_config/client/module_config.json .
110 cp -r /home/sharath/working_config/client/nStackConfig.json .
111 cp -r /home/sharath/working_config/client/rd_config.json .
121 ./nStackCtrl -a add -p ./network_data_tonStack.json -t network
122 ./nStackCtrl -a add -p ./ip_data.json -t ip
124 cd ../../../../release/bin/
125 cp ../../stacks/lwip_stack/release/lib64/libnstack.so .
128 ./vs_epoll -p 20000 -d 192.168.1.207 -a 10000 -s 192.168.1.206 -l 200 -t 5000000 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1
131 ./vc_epoll -p 20000 -d 192.168.1.206 -a 10000 -s 192.168.1.207 -l 200 -t 50000 -i 1000 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1