aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dpdk/dpdk_scripts/init_dpdk.sh
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-06-20 13:57:08 +0200
committerTibor Frank <tifrank@cisco.com>2017-06-29 12:17:28 +0000
commit6721e7f09aa95bff6622068332a3f56afad9c87b (patch)
tree37ef7f40e53f740a62830ab46142aa87342dc56b /tests/dpdk/dpdk_scripts/init_dpdk.sh
parent859157b5db45927c7b4bb0b2d575e68805777a86 (diff)
CSIT-687: Directory structure reorganization
Change-Id: I772c9e214be2461adf58124998d272e7d795220f Signed-off-by: Tibor Frank <tifrank@cisco.com> Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'tests/dpdk/dpdk_scripts/init_dpdk.sh')
-rwxr-xr-xtests/dpdk/dpdk_scripts/init_dpdk.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/dpdk/dpdk_scripts/init_dpdk.sh b/tests/dpdk/dpdk_scripts/init_dpdk.sh
new file mode 100755
index 0000000000..bc4870e73e
--- /dev/null
+++ b/tests/dpdk/dpdk_scripts/init_dpdk.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -x
+
+# Setting variables
+DPDK_VERSION=dpdk-17.05
+ROOTDIR=/tmp/openvpp-testing
+PWDDIR=$(pwd)
+cd ${ROOTDIR}/${DPDK_VERSION}/
+
+modprobe uio
+echo "RC = $?"
+
+lsmod | grep igb_uio
+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
+ rmmod uio_pci_generic || \
+ { echo "Failed to remove uio_pci_generic module"; exit 1; }
+fi
+
+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}