diff options
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh')
-rwxr-xr-x | VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh new file mode 100755 index 00000000..0bde3cc2 --- /dev/null +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh @@ -0,0 +1,12 @@ +link="$(sudo ip -o link | grep MACADDRESS |cut -d":" -f 2)" +if [ -n "$link" ]; +then + echo Need to bind + # Uncomment one of the following lines, depending on which driver + # you want to use: vfio-pci or igb_uio + #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) + sudo driverctl set-override $(sudo ethtool -i $link |grep bus-info | cut -d" " -f 2) vfio-pci +else + echo Assuming port is already bound to DPDK poll mode driver +fi +exit 0 |