4 DPDK_DIR=dpdk-${DPDK_VERSION}
5 DPDK_PACKAGE=${DPDK_DIR}.tar.xz
7 ROOTDIR=/tmp/openvpp-testing
10 #download the DPDK package
11 #compile and install the DPDK
13 wget -q "fast.dpdk.org/rel/${DPDK_PACKAGE}" || exit 1
14 tar xJf ${DPDK_PACKAGE}
16 make install T=x86_64-native-linuxapp-gcc -j || exit 1
20 export RTE_SDK=${ROOTDIR}/${DPDK_DIR}/
21 export RTE_TARGET=x86_64-native-linuxapp-gcc
22 cd ${RTE_SDK}/examples/l3fwd
26 #check and setup the hugepages
27 SYS_HUGEPAGE=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
28 if [ ${SYS_HUGEPAGE} -lt 4096 ]; then
29 MOUNT=$(mount | grep /mnt/huge)
30 while [ "${MOUNT}" != "" ]
34 MOUNT=$(mount | grep /mnt/huge)
37 echo 2048 | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
38 echo 2048 | sudo tee /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
40 sudo mkdir -p /mnt/huge
41 sudo mount -t hugetlbfs nodev /mnt/huge/
42 test $? -eq 0 || exit 1
45 #check and set the max map count
46 SYS_MAP=$(cat /proc/sys/vm/max_map_count)
47 if [ ${SYS_MAP} -lt 200000 ]; then
48 echo 200000 | sudo tee /proc/sys/vm/max_map_count