Support packets in flight
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / rapid / devbind.sh
1 link="$(sudo ip -o link | grep MACADDRESS |cut -d":" -f 2)"
2 if [ -n "$link" ];
3 then
4        echo Need to bind
5        # Uncomment one of the following lines, depending on which driver
6        # you want to use: vfio-pci or igb_uio
7        #sudo /opt/rapid/dpdk/usertools/dpdk-devbind.py --force --bind igb_uio $(sudo /opt/rapid/dpdk/usertools/dpdk-devbind.py --status |grep  $link | cut -d" " -f 1)
8        sudo driverctl set-override $(sudo ethtool -i $link |grep bus-info | cut -d" " -f 2) vfio-pci
9 else
10        echo Assuming port is already bound to DPDK poll mode driver
11 fi
12 exit 0