6f133d1ddcb844a5fb41ce145a9f45fb79b9cac2
[nfvbench.git] / nfvbenchvm / dib / elements / nfvbenchvm / post-install.d / 02-testpmd-script
1 #!/bin/bash
2
3 DPDK=dpdk-18.02
4 DPDK_UNTAR=dpdk-18.02
5
6 # pick up the kernel version for the target image
7 kernel_version=`ls -t /lib/modules | awk 'NR==1 {print}'`
8
9 mkdir dpdk
10 wget http://fast.dpdk.org/rel/$DPDK.tar.xz
11 tar xfJ $DPDK.tar.xz
12 cd $DPDK_UNTAR
13
14 export RTE_KERNELDIR=/lib/modules/$kernel_version/build
15 export ARCH=x86
16 make -j4 install T=x86_64-native-linuxapp-gcc
17
18 cp usertools/dpdk-devbind.py ../dpdk
19 # cp tools/dpdk_nic_bind.py ../dpdk/dpdk-devbind.py
20 cp x86_64-native-linuxapp-gcc/app/testpmd ../dpdk
21 cp x86_64-native-linuxapp-gcc/kmod/igb_uio.ko ../dpdk
22 echo "set promisc all off" > /dpdk/testpmd_cmd.txt
23
24 cd ..
25 rm -f $DPDK.tar.xz
26 rm -rf $DPDK_UNTAR