aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk-tests/dpdk_scripts/install_dpdk.sh
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-02-10 09:24:00 +0100
committerPeter Mikus <pmikus@cisco.com>2017-04-03 09:46:36 +0000
commitec059708c78fe3563bc89507739a2712adc062f3 (patch)
tree1cf1805603919c3b5cf941f53bffa056bdeb7e10 /dpdk-tests/dpdk_scripts/install_dpdk.sh
parentc95798bd9e803a7ad98ed9056e6ddb1a8bbd2dc1 (diff)
Add x710 and xl710 tests for testpmd
10ge2p1x710-eth-l2xcbase-ndrdisc 40ge2p1xl710-eth-l2xcbase-ndrdisc Change-Id: Iea411182fd41e1ae9ed9b5a17f540befc247adb9 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'dpdk-tests/dpdk_scripts/install_dpdk.sh')
-rwxr-xr-xdpdk-tests/dpdk_scripts/install_dpdk.sh39
1 files changed, 25 insertions, 14 deletions
diff --git a/dpdk-tests/dpdk_scripts/install_dpdk.sh b/dpdk-tests/dpdk_scripts/install_dpdk.sh
index 99fa957d59..4b4c04a727 100755
--- a/dpdk-tests/dpdk_scripts/install_dpdk.sh
+++ b/dpdk-tests/dpdk_scripts/install_dpdk.sh
@@ -1,31 +1,40 @@
#!/bin/bash
-DPDK_VERSION=16.07
-DPDK_DIR=dpdk-${DPDK_VERSION}
-DPDK_PACKAGE=${DPDK_DIR}.tar.xz
+set -x
+# Setting variables
+DPDK_VERSION=dpdk-17.02
+DPDK_DIR=${DPDK_VERSION}
+DPDK_PACKAGE=${DPDK_DIR}.tar.xz
ROOTDIR=/tmp/openvpp-testing
PWDDIR=$(pwd)
-#download the DPDK package
-#compile and install the DPDK
+# Download the DPDK package
cd ${ROOTDIR}
-wget -q "fast.dpdk.org/rel/${DPDK_PACKAGE}" || exit 1
-tar xJf ${DPDK_PACKAGE}
+wget "fast.dpdk.org/rel/${DPDK_PACKAGE}" || \
+ echo "Failed to download $DPDK_PACKAGE" || exit 1
+tar xJvf ${DPDK_PACKAGE} || \
+ echo "Failed to extract $DPDK_PACKAGE" || exit 1
+
+# Compile the DPDK
cd ./${DPDK_DIR}
-make install T=x86_64-native-linuxapp-gcc -j || exit 1
+make install T=x86_64-native-linuxapp-gcc -j || \
+ echo "Failed to compile $DPDK_VERSION" || exit 1
cd ${PWDDIR}
-#compile the l3fwd
+# Compile the l3fwd
export RTE_SDK=${ROOTDIR}/${DPDK_DIR}/
export RTE_TARGET=x86_64-native-linuxapp-gcc
cd ${RTE_SDK}/examples/l3fwd
-make -j || exit 1
+make -j || \
+ echo "Failed to compile l3fwd" || exit 1
cd ${PWDDIR}
-#check and setup the hugepages
+# Check and setup the hugepages
SYS_HUGEPAGE=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
+echo " SYS_HUGEPAGE = ${SYS_HUGEPAGE}"
if [ ${SYS_HUGEPAGE} -lt 4096 ]; then
+ echo " It is not enough, should be at least 4096"
MOUNT=$(mount | grep /mnt/huge)
while [ "${MOUNT}" != "" ]
do
@@ -37,13 +46,15 @@ if [ ${SYS_HUGEPAGE} -lt 4096 ]; then
echo 2048 | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 2048 | sudo tee /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+ echo " Mounting hugepages"
sudo mkdir -p /mnt/huge
- sudo mount -t hugetlbfs nodev /mnt/huge/
- test $? -eq 0 || exit 1
+ sudo mount -t hugetlbfs nodev /mnt/huge/ || \
+ echo "Failed to mount hugepages" || exit 1
fi
-#check and set the max map count
+# Check and set the max map count
SYS_MAP=$(cat /proc/sys/vm/max_map_count)
+
if [ ${SYS_MAP} -lt 200000 ]; then
echo 200000 | sudo tee /proc/sys/vm/max_map_count
fi