09a96283d14bb3949b09c5918bf141537ac4d5f2
[csit.git] / tests / dpdk / dpdk_scripts / init_dpdk.sh
1 #!/bin/bash
2
3 set -x
4
5 # Setting variables
6 DPDK_VERSION=dpdk-17.11
7 ROOTDIR=/tmp/openvpp-testing
8 PWDDIR=$(pwd)
9 cd ${ROOTDIR}/${DPDK_VERSION}/
10
11 modprobe uio
12 echo "RC = $?"
13
14 lsmod | grep igb_uio
15 if [ $? -ne 1 ];
16 then
17     rmmod igb_uio || \
18         { echo "Failed to remove igb_uio module"; exit 1; }
19 fi
20
21 lsmod | grep uio_pci_generic
22 if [ $? -ne 1 ];
23 then
24     rmmod uio_pci_generic || \
25         { echo "Failed to remove uio_pci_generic module"; exit 1; }
26 fi
27
28 insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko || \
29     { echo "Failed to insert igb_uio module"; exit 1; }
30
31 # Binding
32 ./usertools/dpdk-devbind.py -b igb_uio $1 $2 || \
33     { echo "Failed to bind interface $1 and $2 to igb_uio"; exit 1; }
34
35 cd ${PWDDIR}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.