aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk-tests/dpdk_scripts/init_dpdk.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dpdk-tests/dpdk_scripts/init_dpdk.sh')
-rwxr-xr-xdpdk-tests/dpdk_scripts/init_dpdk.sh32
1 files changed, 25 insertions, 7 deletions
diff --git a/dpdk-tests/dpdk_scripts/init_dpdk.sh b/dpdk-tests/dpdk_scripts/init_dpdk.sh
index b0bd426021..9870f49f42 100755
--- a/dpdk-tests/dpdk_scripts/init_dpdk.sh
+++ b/dpdk-tests/dpdk_scripts/init_dpdk.sh
@@ -1,17 +1,35 @@
#!/bin/bash
+set -x
+
+# Setting variables
+DPDK_VERSION=dpdk-17.02
ROOTDIR=/tmp/openvpp-testing
PWDDIR=$(pwd)
+cd ${ROOTDIR}/${DPDK_VERSION}/
-cd ${ROOTDIR}/dpdk-16.07/
modprobe uio
+echo "RC = $?"
+
lsmod | grep igb_uio
-if [ $? -eq 1 ];
+if [ $? -ne 1 ];
+then
+ rmmod igb_uio || \
+ echo "Failed to remove igb_uio module" || exit 1
+fi
+
+lsmod | grep uio_pci_generic
+if [ $? -ne 1 ];
then
- insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko || exit 1
-else
- rmmod igb_uio
- insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko || exit 1
+ rmmod uio_pci_generic || \
+ echo "Failed to remove uio_pci_generic module" || exit 1
fi
-./tools/dpdk-devbind.py -b igb_uio $1 $2
+
+insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko || \
+ echo "Failed to insert igb_uio module" || exit 1
+
+# Binding
+./usertools/dpdk-devbind.py -b igb_uio $1 $2 || \
+ echo "Failed to bind interface $1 and $2 to igb_uio" || exit 1
+
cd ${PWDDIR}