blob: 8ab9c6f67650d64819aa0954adaf9b4635cb595d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/bash
ROOTDIR=/tmp/openvpp-testing
PWDDIR=$(pwd)
TESTPMD_LOG=/tmp/testpmd.log
TESTPMD_PID=/tmp/testpmd.pid
port1_driver=$1
port1_pci=$2
port2_driver=$3
port2_pci=$4
#kill the dpdk application
sudo pkill testpmd
sudo pkill l2fwd
sudo pkill l3fwd
sudo rm -f ${TESTPMD_PID}
sudo rm -f /dev/hugepages/*
cat ${TESTPMD_LOG}
sleep 2
cd ${ROOTDIR}/dpdk-16.07/
./tools/dpdk-devbind.py -b ${port1_driver} ${port1_pci}
./tools/dpdk-devbind.py -b ${port2_driver} ${port2_pci}
sleep 2
if1_name=`./tools/dpdk-devbind.py --s | grep "${port1_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
if2_name=`./tools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
ifconfig ${if1_name} up
ifconfig ${if2_name} up
rmmod igb_uio
rmmod uio
cd ${PWDDIR}
|