Merge pull request #118 from pjediny/master
Enabling SR-IOV support
diff --git a/README.rst b/README.rst
index 94e97dc..99e9d5b 100644
--- a/README.rst
+++ b/README.rst
@@ -9,3 +9,16 @@
Network configuration
=====================
+Enable SR-IOV support
+---------------------
+
+Include class at `cluster.<name>.openstack.compute`
+
+- system.nova.compute.sriov
+
+and parameters:
+
+- sriov_nic01: Name of the interface
+- sriov_nic01_numvfs: Number of Virtual Functions
+- sriov_nic01_physical_network: Default "physnet1", label for physical network interface belongs to.
+- sriov_unsafe_interrupts: Default False, needs to be set True if your hw platform does not support interrupt remapping
diff --git a/nova/compute/sriov.yml b/nova/compute/sriov.yml
new file mode 100644
index 0000000..b93363c
--- /dev/null
+++ b/nova/compute/sriov.yml
@@ -0,0 +1,21 @@
+parameters:
+ _param:
+ sriov_nic01_physical_network: physnet1
+ sriov_unsafe_interrupts: False
+ nova:
+ compute:
+ sriov:
+ sriov_nic01:
+ devname: ${_param:sriov_nic01_device_name}
+ physical_network: ${_param:sriov_nic01_physical_network}
+ linux:
+ system:
+ kernel:
+ sriov: True
+ unsafe_interrupts: ${_param:sriov_unsafe_interrupts}
+ rc:
+ local: |
+ #!/bin/sh -e
+ # Enabling ${_param:sriov_nic01_numvfs} VFs on ${_param:sriov_nic01_device_name} PF
+ echo ${_param:sriov_nic01_numvfs} > /sys/class/net/${_param:sriov_nic01_device_name}/device/sriov_numvfs; sleep 2; ip link set ${_param:sriov_nic01_device_name} up
+ exit 0
\ No newline at end of file
diff --git a/nova/control/cluster.yml b/nova/control/cluster.yml
index ac08d43..a8d25b7 100644
--- a/nova/control/cluster.yml
+++ b/nova/control/cluster.yml
@@ -13,7 +13,7 @@
vncproxy_url: ${_param:nova_vncproxy_url}
security_group: false
dhcp_domain: novalocal
- scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter"
+ scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
cpu_allocation_ratio: 16.0
ram_allocation_ratio: 1.5
disk_allocation_ratio: 1.0