Jump to: navigation, search

Difference between revisions of "Libvirt-direct-network"

(Adding libvirt network interface to VIF Driver)
Line 1: Line 1:
=== Adding libvirt network interface to VIF Driver ===
+
=== Adding Virtual Network Interface supprot for Libvirt VIF Driver ===
This Wiki target is to clarify what is proposed in the [https://blueprints.launchpad.net/nova/+spec/libvirt-direct-network blueprint].
 
  
The existing VIF drivers usually use one physical Interface to connect to the network.<br />
+
In order to provide Hardware Based Virtual NICs (SR-IOV) there are two options: Direct Interface (Paravirtualized) or as PCI Device (hostdev).<br />
  
When there is a need to use more than one Interface (such when using SR-IOV Virtual Functions) the VIF Driver can configure the vNIC
+
It's possible to assign the interfaces specifically by using the Interface name or the PCI device address.<br />
with the device name.<br />
 
  
A better solution is to create a Network pool as described here : http://libvirt.org/formatnetwork.html#examplesDirect
+
This approach has several limitations well documented [http://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition here]<br />
 +
 
 +
 
 +
It is possible to avoid  these problems by creating a libvirt network with a device pool containing all the VFs of an SR-IOV device. <br />
 +
A network device is chosen from the interface pool and directly assigned to the guest.<br />
 +
 
 +
Support is available starting with libvirt 0.9.4 - for direct assignment and 0.10.0 for PCI Device assignment.<br />
  
 
==== Configuring the vNIC ====
 
==== Configuring the vNIC ====
For Configuration  - The Network pool name should be provided to the VIF Driver.<br />
+
For Configuration  - The Network pool name and the vnic_type should be provided to the VIF Driver '<br />
On the first phase - It will be provided by adding a configuration variable to the nova.conf named physical_network.
+
On the first phase - The network pool name It will be provided by adding a configuration variable to the nova.conf named 'physical_network' and the vnic_type is 'direct'.<br />
Next Phase should be to get it from Nova through the mapping  Dictionary.
+
 
 +
Next Phase should extend the data that is provided to the VIF Driver once the quantum port is created to provide the physical network name.
  
 
==== Creation of the Network Pool ====
 
==== Creation of the Network Pool ====
 
The creation of the Network Pool will be done according to Physical Network mapping to physical interface(s) either Manually (First phase) or by the Quantum Plugin Agent.
 
The creation of the Network Pool will be done according to Physical Network mapping to physical interface(s) either Manually (First phase) or by the Quantum Plugin Agent.
 +
An example for Network definition can be found [http://libvirt.org/formatnetwork.html#examplesDirect here]
  
 
==== Implementation ====
 
==== Implementation ====
The Implementation is using LibvirtGenericVIFDriver
+
* Additional vnic_type - 'direct' is defined.<br />
 +
* The Implementation extends LibvirtGenericVIFDriver.<br />
 +
* Initial support is for direct interface assignment.<br />
 +
* Next phase will add support for PCI device assignment.<br />
  
You can watch the review process here:
+
Related Nova blueprint - [https://blueprints.launchpad.net/nova/+spec/libvirt-direct-network Adding libvirt network interface to VIF Driver blueprint ]<br />
https://review.openstack.org/#/c/29048/
+
[https://wiki.openstack.org/wiki/Mellanox-Quantum Mellanox Quantum Plugin] requires this functionality <br />
 +
You can watch the review process here:<br />
 +
https://review.openstack.org/#/c/29048/<br />

Revision as of 06:51, 20 May 2013

Adding Virtual Network Interface supprot for Libvirt VIF Driver

In order to provide Hardware Based Virtual NICs (SR-IOV) there are two options: Direct Interface (Paravirtualized) or as PCI Device (hostdev).

It's possible to assign the interfaces specifically by using the Interface name or the PCI device address.

This approach has several limitations well documented here


It is possible to avoid these problems by creating a libvirt network with a device pool containing all the VFs of an SR-IOV device.
A network device is chosen from the interface pool and directly assigned to the guest.

Support is available starting with libvirt 0.9.4 - for direct assignment and 0.10.0 for PCI Device assignment.

Configuring the vNIC

For Configuration - The Network pool name and the vnic_type should be provided to the VIF Driver '
On the first phase - The network pool name It will be provided by adding a configuration variable to the nova.conf named 'physical_network' and the vnic_type is 'direct'.

Next Phase should extend the data that is provided to the VIF Driver once the quantum port is created to provide the physical network name.

Creation of the Network Pool

The creation of the Network Pool will be done according to Physical Network mapping to physical interface(s) either Manually (First phase) or by the Quantum Plugin Agent. An example for Network definition can be found here

Implementation

  • Additional vnic_type - 'direct' is defined.
  • The Implementation extends LibvirtGenericVIFDriver.
  • Initial support is for direct interface assignment.
  • Next phase will add support for PCI device assignment.

Related Nova blueprint - Adding libvirt network interface to VIF Driver blueprint
Mellanox Quantum Plugin requires this functionality
You can watch the review process here:
https://review.openstack.org/#/c/29048/