summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-04-27 12:32:43 -0400
committerLuc Provoost <luc.provoost@intel.com>2020-05-15 11:55:09 +0200
commit4d932aced6931d756e07dbce6ab7cf04799ba5f4 (patch)
treee8ac2d1af449671f451450fb8ae106496a73798f /VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh
parent44327c1d12591af41658a4c492fdee597fe4ab74 (diff)
Code rewrite and Python3 support
The code has been rewritten in multiple classes and files for better readability and maintainability. You should now also use Python3 to run the scripts. Some of the variables in the config files have moved to other sections. The pushgateway parameter moved to the [varia] section of the rapid environment file. Change-Id: Ic61a1bc3baa39447d42b21dfcc0f16c28fcdfa6e Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh')
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh9
1 files changed, 9 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..ac6ccaa1
--- /dev/null
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/devbind.sh
@@ -0,0 +1,9 @@
+link="$(sudo ip -o link | grep MACADDRESS |cut -d":" -f 2)"
+if [ -n "$link" ];
+then
+ echo Need to bind
+ sudo ~/dpdk/usertools/dpdk-devbind.py --force --bind igb_uio $(sudo ~/dpdk/usertools/dpdk-devbind.py --status |grep $link | cut -d" " -f 1)
+else
+ echo Assuming port is already bound to DPDK
+fi
+exit 0