FIX: NF_density MAC addresses
[csit.git] / tests / dpdk / dpdk_scripts / init_dpdk.sh
index 09a9628..7d3df0a 100755 (executable)
@@ -3,33 +3,25 @@
 set -x
 
 # Setting variables
-DPDK_VERSION=dpdk-17.11
+DPDK_DIR=dpdk
 ROOTDIR=/tmp/openvpp-testing
 PWDDIR=$(pwd)
-cd ${ROOTDIR}/${DPDK_VERSION}/
 
-modprobe uio
-echo "RC = $?"
+# set arch, default to x86_64 if none given
+ARCH=${3:-"x86_64"}
 
-lsmod | grep igb_uio
-if [ $? -ne 1 ];
-then
-    rmmod igb_uio || \
-        { echo "Failed to remove igb_uio module"; exit 1; }
+# dpdk prefers "arm64" to "aarch64" and does not allow arm64 native target
+if [ $ARCH == "aarch64" ]; then
+    ARCH="arm64"
+    MACHINE="armv8a"
+else
+    MACHINE="native"
 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; }
+cd ${ROOTDIR}/${DPDK_DIR}/
 
 # Binding
-./usertools/dpdk-devbind.py -b igb_uio $1 $2 || \
-    { echo "Failed to bind interface $1 and $2 to igb_uio"; exit 1; }
+./usertools/dpdk-devbind.py -b vfio-pci $1 $2 || \
+    { echo "Failed to bind interface $1 and $2 to vfio-pci"; exit 1; }
 
 cd ${PWDDIR}