Disable transparent hugepage and make siorv vf num configurable

Change-Id: I5bfde10a3c44f7a8aff4d6507c71a4a113da5301
diff --git a/aether-playbook/roles/sriov-dpdk/defaults/main.yml b/aether-playbook/roles/sriov-dpdk/defaults/main.yml
index c40b02c..a395ee6 100644
--- a/aether-playbook/roles/sriov-dpdk/defaults/main.yml
+++ b/aether-playbook/roles/sriov-dpdk/defaults/main.yml
@@ -15,3 +15,4 @@
 ---
 # Provide SRIOV PF name for UPF to run the playbook
 #upf_sriov_pf:
+upf_sriov_num_vf: 8
diff --git a/aether-playbook/roles/sriov-dpdk/tasks/main.yml b/aether-playbook/roles/sriov-dpdk/tasks/main.yml
index 593386e..38d686b 100644
--- a/aether-playbook/roles/sriov-dpdk/tasks/main.yml
+++ b/aether-playbook/roles/sriov-dpdk/tasks/main.yml
@@ -32,7 +32,7 @@
     backrefs: yes
   loop:
     - { regex: 'intel_iommu=on', context: 'intel_iommu=on' }
-    - { regex: 'hugepagesz=', context: 'hugepagesz=1G default_hugepagesz=1G hugepages=32' }
+    - { regex: 'hugepagesz=', context: 'transparent_hugepage=never hugepagesz=1G default_hugepagesz=1G hugepages=32' }
   register: grub
   notify: update grub
   tags: sriov-dpdk
diff --git a/aether-playbook/roles/sriov-dpdk/templates/usr/bin/sriov.sh.j2 b/aether-playbook/roles/sriov-dpdk/templates/usr/bin/sriov.sh.j2
index 6b2a8e6..90594e2 100644
--- a/aether-playbook/roles/sriov-dpdk/templates/usr/bin/sriov.sh.j2
+++ b/aether-playbook/roles/sriov-dpdk/templates/usr/bin/sriov.sh.j2
@@ -27,7 +27,7 @@
 
 	echo "Resetting PF $pf"
 	echo 0 | tee /sys/class/net/"$pf"/device/sriov_numvfs
-	num_vfs=$(cat /sys/class/net/"$pf"/device/sriov_totalvfs)
+	num_vfs={{ upf_sriov_num_vf }}
 	echo "Enabling $num_vfs VFs for $pf"
 	echo "$num_vfs" | tee /sys/class/net/"$pf"/device/sriov_numvfs
 	ip link set "$pf" up