<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Itzikb</id>
		<title>OpenStack - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Itzikb"/>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/wiki/Special:Contributions/Itzikb"/>
		<updated>2026-07-11T18:38:32Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=SR-IOV-Passthrough-For-Networking&amp;diff=66947</id>
		<title>SR-IOV-Passthrough-For-Networking</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=SR-IOV-Passthrough-For-Networking&amp;diff=66947"/>
				<updated>2014-10-29T10:09:53Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* VM creation flow with SR-IOV vNIC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=SR-IOV Networking in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support to request VM access to virtual network via SR-IOV NIC. With the introduction of SR-IOV based NICs, the traditional virtual bridge is no longer required. Each SR-IOV port is associated with a virtual function (VF). SR-IOV ports may be provided by Hardware-based Virtual Ethernet Bridging (HW VEB); or they may be extended to an upstream physical switch (IEEE 802.1br).  &lt;br /&gt;
There are two ways that SR-IOV port may be connected:&lt;br /&gt;
* directly connected to its VF&lt;br /&gt;
* connected with a macvtap device that resides on the host, which is then connected to the corresponding VF&lt;br /&gt;
&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV enables scheduling an instance with SR-IOV ports based on their network connectivity. The neutron ports' associated physical networks have to be considered in making the scheduling decision.&lt;br /&gt;
PCI Whitelist has been enchanced to allow tags to be associated with PCI devices. PCI devices available for SR-IOV networking should be tagged with physical_network label.&lt;br /&gt;
&lt;br /&gt;
For SR-IOV networking, a pre-defined tag &amp;quot;physical_network&amp;quot; is used to define the physical network to which the devices are attached. A whitelist entry is defined as:&lt;br /&gt;
    [&amp;quot;vendor_id&amp;quot;: &amp;quot;&amp;lt;id&amp;gt;&amp;quot;,] [&amp;quot;product_id&amp;quot;: &amp;quot;&amp;lt;id&amp;gt;&amp;quot;,]&lt;br /&gt;
    [&amp;quot;address&amp;quot;: &amp;quot;[[[[&amp;lt;domain&amp;gt;]:]&amp;lt;bus&amp;gt;]:][&amp;lt;slot&amp;gt;][.[&amp;lt;function&amp;gt;]]&amp;quot; |&lt;br /&gt;
    &amp;quot;devname&amp;quot;: &amp;quot;Ethernet Interface Name&amp;quot;,]  &lt;br /&gt;
    &amp;quot;physical_network&amp;quot;:&amp;quot;name string of the physical network&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;id&amp;gt; can be an asterisk (*) or a valid vendor/product ID as displayed by the Linux utility lspci. The address uses the same syntax as in lspci. The devname can be a valid PCI device name. The only device names that are supported are those displayed by the Linux utility ifconfig -a and correspond to either a PF or a VF on a vNIC.&lt;br /&gt;
&lt;br /&gt;
If the device defined by the address or devname corresponds to a SR-IOV PF, all VFs under the PF will match the entry.&lt;br /&gt;
&lt;br /&gt;
Multiple whitelist entries per host are supported.&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV requires ML2 Plugin with SR-IOV supporting mechanism driver.&lt;br /&gt;
Currently there is ML2 Mechanism Driver for SR-IOV capable NIC based switching (HW VEB).&lt;br /&gt;
There are network adapters from different vendors that vary by supporting various functionality.&lt;br /&gt;
If VF link state update is supported by vendor network adapter, the  SR-IOV NIC L2 agent should be deployed to leverage this functionality .&lt;br /&gt;
&lt;br /&gt;
==VM creation flow with SR-IOV vNIC== &lt;br /&gt;
* Create one or more neutron ports. Run:&lt;br /&gt;
   neutron port-create &amp;lt;net-id&amp;gt; --binding:vnic-type &amp;lt;direct | macvtap | normal&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Boot VM with one or more neutron ports. Run:&lt;br /&gt;
   nova boot --flavor m1.large --image &amp;lt;image&amp;gt;&lt;br /&gt;
          --nic port-id=&amp;lt;port1&amp;gt; --nic port-id=&amp;lt;port2&amp;gt; &amp;lt;vm name&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Note that in the nova boot API, users can specify either a port-ID or a net-ID. If a net-ID is specified, it is assumed that the user is requesting a normal virtual port (which is not an SR-IOV port).&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = physnet1:2:100&lt;br /&gt;
&lt;br /&gt;
If SRIOV network adapters support VF link state setting and admin state management is desired, make sure  to add /etc/neutron/plugins/ml2/ml2_conf_sriov.ini  with following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===nova-compute===&lt;br /&gt;
On each compute node you have to associate the VFs available to each physical network.&lt;br /&gt;
That is performed by configuring  pci_passthrough_whitelist in /etc/nova/nova.conf. So, for example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This associates any VF with address that includes ':0a:00.' in its address to the physical network physnet1.&lt;br /&gt;
&lt;br /&gt;
After configuring the whitelist you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===SR-IOV neutron agent===&lt;br /&gt;
If the hardware supports it and you want to enable changing the port admin_state, you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server, you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
In /etc/neutron/plugins/ml2/ml2_conf.ini make sure you have the following:&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Modify /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows:&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* physnet1 is the physical network&lt;br /&gt;
* eth1 is the physical function (PF)&lt;br /&gt;
* exclude_devices is empty so all the VFs associated with eth1 may be configured by the agent&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file, start the Neutron SR-IOV agent. Run:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent does not configure them, you need to list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3, eth2:0000:05:00.1; 0000:05:00.2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[http://community.mellanox.com/docs/DOC-1484 Openstack ML2 SR-IOV driver support]&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62299</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62299"/>
				<updated>2014-09-09T14:24:25Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
In /etc/neutron/plugins/ml2/ml2_conf.ini make sure you have the following:&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3, eth2:0000:05:00.1; 0000:05:00.2&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62298</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62298"/>
				<updated>2014-09-09T14:24:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
In /etc/neutron/plugins/ml2/ml2_conf.ini make sure you have the following:&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3, eth2:0000:05:00.1; 0000:05:00.2&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62297</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62297"/>
				<updated>2014-09-09T14:20:05Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Exclude VFs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3, eth2:0000:05:00.1; 0000:05:00.2&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62296</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62296"/>
				<updated>2014-09-09T14:18:13Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Exclude VFs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62295</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62295"/>
				<updated>2014-09-09T14:14:27Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Exclude VFs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to put list them in the sriov_nic section:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:''' exclude_devices = eth1:0000:07:00.2; 0000:07:00.3&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62294</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62294"/>
				<updated>2014-09-09T14:13:51Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent:&lt;br /&gt;
 neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to put list them in the sriov_nic section:&lt;br /&gt;
'''Example:'''exclude_devices = eth1:0000:07:00.2; 0000:07:00.3&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62293</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62293"/>
				<updated>2014-09-09T14:12:36Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
physnet1 is the physical network&lt;br /&gt;
eth1 if the Physical Function (PF)&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;br /&gt;
&lt;br /&gt;
After modifying the configuration file start the Neutron SR-IOV agent.&lt;br /&gt;
&lt;br /&gt;
====Exclude VFs====&lt;br /&gt;
If you want to exclude some of the VFs so the agent won't configure them you need to put list them in the sriov_nic section:&lt;br /&gt;
'''Example:'''exclude_devices = eth1:0000:07:00.2; 0000:07:00.3&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62280</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62280"/>
				<updated>2014-09-09T11:05:26Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:'''If you configured agent_required=True on the Neutron server you must run the Agent on each compute node.&lt;br /&gt;
&lt;br /&gt;
Modify  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini as follows&lt;br /&gt;
&lt;br /&gt;
 [sriov_nic]&lt;br /&gt;
 physical_device_mappings = physnet1:eth1&lt;br /&gt;
 exclude_devices =&lt;br /&gt;
&lt;br /&gt;
Where physnet1 is the physical network, eth1 if the Physical Function (PF).&lt;br /&gt;
exclude_devices is empty so All the VFs associated with eth1 are allowed to be configured by the agent.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62264</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62264"/>
				<updated>2014-09-09T09:11:44Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compute==&lt;br /&gt;
===Nova===&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron===&lt;br /&gt;
If the hardware supports and and you want to enable changing the port admin_state you have to run the Neutron SR-IOV agent.&lt;br /&gt;
Note:&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62263</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62263"/>
				<updated>2014-09-09T09:03:10Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Nova */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62262</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62262"/>
				<updated>2014-09-09T09:02:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
==Nova==&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
===Neutron Server===&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 firewall_driver = neutron.agent.firewall.NoopFirewallDriver&lt;br /&gt;
&lt;br /&gt;
Make sure  /etc/neutron/plugins/ml2/ml2_conf_sriov.ini has the following section:&lt;br /&gt;
&lt;br /&gt;
 [ml2_sriov]&lt;br /&gt;
 agent_required = True&lt;br /&gt;
&lt;br /&gt;
Neutron server should be run with the two configuration files /etc/neutron/plugins/ml2/ml2_conf.in and /etc/neutron/plugins/ml2/ml2_conf_sriov.ini &lt;br /&gt;
 neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62181</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62181"/>
				<updated>2014-09-07T07:30:18Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* SR-IOV Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
&lt;br /&gt;
==Nova==&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;br /&gt;
&lt;br /&gt;
== Neutron ==&lt;br /&gt;
Using ML2 Neutron plugin modify /etc/neutron/plugins/ml2/ml2_conf.ini:&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 type_drivers = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,sriovnicswitch&lt;br /&gt;
&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type=hostdev&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62180</id>
		<title>Juno-SR-IOV</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Juno-SR-IOV&amp;diff=62180"/>
				<updated>2014-09-07T07:25:12Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* SR-IOV Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=This Page is under construction=&lt;br /&gt;
Once it will be ready, the content might move to another location.&lt;br /&gt;
=SR-IOV in OpenStack Juno= &lt;br /&gt;
OpenStack Juno adds inbox support for SR-IOV ....&lt;br /&gt;
==Nova==&lt;br /&gt;
Nova support for SR-IOV is ....&lt;br /&gt;
&lt;br /&gt;
==Neutron== &lt;br /&gt;
Neutron support for SR-IOV is ...&lt;br /&gt;
embedded NIC is ...&lt;br /&gt;
&lt;br /&gt;
=SR-IOV Configuration=&lt;br /&gt;
On each compute you have to associate the Virtual Functions available to each Physical Network.&lt;br /&gt;
You do it by configuring  pci_passthrough_whitelist in /etc/nova/noca.conf&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 pci_passthrough_whitelist = {&amp;quot;address&amp;quot;:&amp;quot;*:0a:00.*&amp;quot;,&amp;quot;physical_network&amp;quot;:&amp;quot;physnet1&amp;quot;}&lt;br /&gt;
This will associate any VF with address that includes ':0a:00.' in it's address to the Physical network physnet1&lt;br /&gt;
&lt;br /&gt;
After configuring the white list you have to restart nova-compute service.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61780</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61780"/>
				<updated>2014-09-01T14:27:05Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* OpenSM configuration - Without UFM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #service eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #service neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #service neutron-openvswitch-agent start&lt;br /&gt;
   #service neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #service neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #service opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #service openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #service eswitchd restart&lt;br /&gt;
   #service neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
  [libvirt]&lt;br /&gt;
  vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
And restart openibd:&lt;br /&gt;
&lt;br /&gt;
 #service openibd restart&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example: Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
  driver: eth_ipoib&lt;br /&gt;
  version: 1.0.0&lt;br /&gt;
  firmware-version: 1 &lt;br /&gt;
  bus-info: ib0&lt;br /&gt;
  supports-statistics: yes&lt;br /&gt;
  supports-test: no&lt;br /&gt;
  supports-eeprom-access: no&lt;br /&gt;
  supports-register-dump: no&lt;br /&gt;
  supports-priv-flags: no&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
  [linux_bridge] &lt;br /&gt;
  physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Restart neutron-linuxbridge-agent and neutron-dhcp-agent&lt;br /&gt;
   &lt;br /&gt;
  #service neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #service neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61779</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61779"/>
				<updated>2014-09-01T14:26:17Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #service eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #service neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #service neutron-openvswitch-agent start&lt;br /&gt;
   #service neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #service neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #service openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #service eswitchd restart&lt;br /&gt;
   #service neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
  [libvirt]&lt;br /&gt;
  vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
And restart openibd:&lt;br /&gt;
&lt;br /&gt;
 #service openibd restart&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example: Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
  driver: eth_ipoib&lt;br /&gt;
  version: 1.0.0&lt;br /&gt;
  firmware-version: 1 &lt;br /&gt;
  bus-info: ib0&lt;br /&gt;
  supports-statistics: yes&lt;br /&gt;
  supports-test: no&lt;br /&gt;
  supports-eeprom-access: no&lt;br /&gt;
  supports-register-dump: no&lt;br /&gt;
  supports-priv-flags: no&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
  [linux_bridge] &lt;br /&gt;
  physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Restart neutron-linuxbridge-agent and neutron-dhcp-agent&lt;br /&gt;
   &lt;br /&gt;
  #service neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #service neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61778</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61778"/>
				<updated>2014-09-01T14:25:29Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Start Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #service eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #service neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #service openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #service eswitchd restart&lt;br /&gt;
   #service neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
  [libvirt]&lt;br /&gt;
  vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
And restart openibd:&lt;br /&gt;
&lt;br /&gt;
 #service openibd restart&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example: Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
  driver: eth_ipoib&lt;br /&gt;
  version: 1.0.0&lt;br /&gt;
  firmware-version: 1 &lt;br /&gt;
  bus-info: ib0&lt;br /&gt;
  supports-statistics: yes&lt;br /&gt;
  supports-test: no&lt;br /&gt;
  supports-eeprom-access: no&lt;br /&gt;
  supports-register-dump: no&lt;br /&gt;
  supports-priv-flags: no&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
  [linux_bridge] &lt;br /&gt;
  physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Restart neutron-linuxbridge-agent and neutron-dhcp-agent&lt;br /&gt;
   &lt;br /&gt;
  #service neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #service neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61777</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61777"/>
				<updated>2014-09-01T14:24:25Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #service openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #service eswitchd restart&lt;br /&gt;
   #service neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
  [libvirt]&lt;br /&gt;
  vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
And restart openibd:&lt;br /&gt;
&lt;br /&gt;
 #service openibd restart&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example: Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
  driver: eth_ipoib&lt;br /&gt;
  version: 1.0.0&lt;br /&gt;
  firmware-version: 1 &lt;br /&gt;
  bus-info: ib0&lt;br /&gt;
  supports-statistics: yes&lt;br /&gt;
  supports-test: no&lt;br /&gt;
  supports-eeprom-access: no&lt;br /&gt;
  supports-register-dump: no&lt;br /&gt;
  supports-priv-flags: no&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
  [linux_bridge] &lt;br /&gt;
  physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Restart neutron-linuxbridge-agent and neutron-dhcp-agent&lt;br /&gt;
   &lt;br /&gt;
  #service neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #service neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61776</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61776"/>
				<updated>2014-09-01T14:09:53Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* SR-IOV */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #service openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #service eswitchd restart&lt;br /&gt;
   #service neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
  [libvirt]&lt;br /&gt;
  vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #service openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61775</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61775"/>
				<updated>2014-09-01T14:05:52Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Para-Virtualized */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61774</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61774"/>
				<updated>2014-09-01T14:04:41Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Neutron Server Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
We are using the linuxbridge mechanism driver so we can use the DHCP Server with the Linux Bridge interface driver.&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/neutron/plugins/ml2/ml2_conf.ini  as follows (The VLAN range is an example)&lt;br /&gt;
&lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = linuxbridge,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges=default:2:10&lt;br /&gt;
 [securitygroup]&lt;br /&gt;
 enable_security_group = True&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61772</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=61772"/>
				<updated>2014-09-01T13:47:06Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Start Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=58602</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=58602"/>
				<updated>2014-07-22T07:23:39Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. In /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Check that the compute driver is libvirt:&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=libvirt.LibvirtDriver&lt;br /&gt;
&lt;br /&gt;
Change the VIF driver:&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized mode make sure vif driver is as follows:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=57843</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=57843"/>
				<updated>2014-07-10T11:57:41Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/ml2/ml2_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=57300</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=57300"/>
				<updated>2014-07-03T11:43:31Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = openvswitch,mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=56869</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=56869"/>
				<updated>2014-06-26T12:18:24Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    [libvirt]&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56599</id>
		<title>Meetings/Passthrough</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56599"/>
				<updated>2014-06-24T11:45:29Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Agenda on Jun 24th, 2014 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next meeting will be on Wed May 7th at 1300 UTC on #openstack-meeting-alt&lt;br /&gt;
&lt;br /&gt;
== Apologies for Absence ==&lt;br /&gt;
* 2014-06-24 Irena Berezovsky (irenab)&lt;br /&gt;
&lt;br /&gt;
=== Agenda on May 26th, 2014 ===&lt;br /&gt;
* Nova SR-IOV networking&lt;br /&gt;
** [https://review.openstack.org/#/c/86606/ nova spec review]&lt;br /&gt;
** patch submission soon&lt;br /&gt;
** tempest tests&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://review.openstack.org/#/c/82206/ Init PCI manager after compute node initialization]&lt;br /&gt;
** [https://review.openstack.org/#/c/81954/ makes sure correct PCI device allocation]&lt;br /&gt;
* Other works/features&lt;br /&gt;
** Live migration&lt;br /&gt;
** Attach SR-IOV port to an existing instance&lt;br /&gt;
** possibly changing the names of existing vnic-types&lt;br /&gt;
** associate a default vnic-type with a neutron network&lt;br /&gt;
** admin controlled knobs&lt;br /&gt;
** HA &lt;br /&gt;
** others&lt;br /&gt;
&lt;br /&gt;
=== Agenda on March 25th, 2014 ===&lt;br /&gt;
* PCI SR-IOV Networking use case&lt;br /&gt;
Refer to https://docs.google.com/document/d/1zgMaXqrCnad01-jQH7Mkmf6amlghw9RMScGLBrKslmw/edit&lt;br /&gt;
&lt;br /&gt;
=== Recap of Discussions ===&lt;br /&gt;
==== Current PCI Passthrough ====&lt;br /&gt;
&lt;br /&gt;
* How to Use Wiki: https://wiki.openstack.org/wiki/Pci_passthrough&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: defines all the PCI passthrough devices that are available on a compute node. It's currently based on &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt;&lt;br /&gt;
* PCI stats group: defines the keys based on which a PCI device is accounted. It's currently based on the keys: &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;extra_info or simply PCI address of a physical function&amp;gt;. &lt;br /&gt;
* PCI Alias: specifies a list of PCI device requirements. A PCI requirement specifies a dictionary with keys: &amp;lt;alias name&amp;gt; &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;device_type&amp;gt;. Multiple requirements can be specified per PCI Alias with the same &amp;lt;device_type&amp;gt; (which may not work yet due to bugs). &amp;lt;alias name&amp;gt; is required. Others are optional.&lt;br /&gt;
* Nova Server Flavor: PCI requirements can be added into a nova flavor as it's extra-spec in the syntax &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot;&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;{,&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;}&amp;quot; &lt;br /&gt;
* PCI Passthrough filter for nova scheduler: this filter works based on the PCI stats group and PCI aliases referenced in the nova flavor. If mutliple aliases exist in the flavor, all of the them have to be satified. If multiple PCI requirements exist in one PCI alias, only one of the requirements defined in the alias needs to be satisfied. Suppose a PCI requirement is represented as R, and a PCI alias as (R1 OR R2 OR ...):count. Further assuming two PCI aliases, with the first one having two PCI requirements, with the second having one PCI requirement. Logically speaking, in order to choose a host as candidate, it must satisfy &lt;br /&gt;
        (R11 OR R12):count AND R21:count&lt;br /&gt;
&lt;br /&gt;
Given a PCI requirement, it's used to match against PCI stats groups until one or multiple matches are found to satisfy the count. Note that matching is based on the keys existing in the PCI requirement. Therefore it's possible for a PCI requirement to be matching multiple PCI stats groups.  &lt;br /&gt;
&lt;br /&gt;
==== Motivation for enhancement ====&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work if a compute node has multiple vNICs from the same vendor that are not used in the same way.&lt;br /&gt;
* PCI requirement only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work when the vNIC ports are connected to different physical networks . In other words, PCI devices from the same vendor may not be treated equally when it comes to choose vNIC ports for a VM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== What we have discussed so far to satisfy the above requirements ====&lt;br /&gt;
&lt;br /&gt;
===== PCI Group =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit#heading=h.30de7p6sgoxp. The doc becomes messy and almost unreadable. But refer to https://wiki.openstack.org/wiki/Meetings/Passthrough#Agenda_on_Jan._8th.2C_2014 for the main ideas behind it.&lt;br /&gt;
* PCI Group: a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud&lt;br /&gt;
* PCI whitelist: each entry is defined as a tuple of &amp;lt;device-filter, pci-group-name&amp;gt;. The device-filter uses vendor_id, product_id and PCI addresses to specify a collection of PCI devices. &lt;br /&gt;
* PCI stats group: each PCI group is a PCI stats group&lt;br /&gt;
* PCI Alias: alias is no longer needed&lt;br /&gt;
* Nova Server Flavor: Use G to represent a PCI group. An exampel of PCI requirements can be specified as:&lt;br /&gt;
                  (G1 OR G2):count AND G3:count&lt;br /&gt;
It defines that the VM needs &amp;quot;count&amp;quot; of PCI devices that are either from G1 or G2, and 'count&amp;quot; of PCI devices from G3.&lt;br /&gt;
&lt;br /&gt;
It supports only one well-defined tag called PCI group, which is considered too limited by some of the folks. &lt;br /&gt;
It simplifies the existing implementation without losing any of its capabilities (or use cases the current implementation can support).&lt;br /&gt;
&lt;br /&gt;
===== PCI Flavor =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: it's called PCI information in the above wiki&lt;br /&gt;
* PCI stats group: not clearly defined&lt;br /&gt;
* PCI flavor Attributes: refer to the wiki&lt;br /&gt;
* PCI flavor API: refer to the wiki&lt;br /&gt;
&lt;br /&gt;
This can be considered a generalized version of PCI Group as it supports arbitrary number of arbitrary tags. But system behaviors (PCI stats groups and scheduling, for example) are not clearly specified. Use cases to justify it is yet to be established.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Host Aggregate =====&lt;br /&gt;
&lt;br /&gt;
It was brought up during the discussion that the existing host aggregate may be used to support the new requirement. A couple of issues with host aggregate were discussed:&lt;br /&gt;
* it doesn't support dynamic host join to a host aggregate&lt;br /&gt;
* scheduling with host aggregate is not stats based.&lt;br /&gt;
&lt;br /&gt;
===== Nic Type/Flavor =====&lt;br /&gt;
Refer to http://lists.openstack.org/pipermail/openstack-dev/2014-January/023981.html and http://lists.openstack.org/pipermail/openstack-dev/2013-December/022737.html&lt;br /&gt;
&lt;br /&gt;
===== A compromised implementation =====&lt;br /&gt;
to speed up the development and facilitate integration testing with neutron.&lt;br /&gt;
Refer to https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov. Also refer to the submitted patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BPs &amp;amp; Patches ===&lt;br /&gt;
==== Neutron Side ====&lt;br /&gt;
* RKukura (binding:vif_details and binding:profile)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/vif-details&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-binding-profile&lt;br /&gt;
* Sadasu (Cisco MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-ucs-manager-mechanism-driver&lt;br /&gt;
* Irenab (vnic_type and mlnx MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-sriov-nic-switch&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/mlnx-ml2-support&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
* Baoli (for anything else that's needed for SRIOV in neutron)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
&lt;br /&gt;
==== Nova Side ====&lt;br /&gt;
* Baoli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
* Yongli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info&lt;br /&gt;
* Yunhong&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info-icehouse&lt;br /&gt;
&lt;br /&gt;
==== Itzik's patch to add physical network in VIF ====&lt;br /&gt;
https://review.openstack.org/#/c/59093/&lt;br /&gt;
&lt;br /&gt;
===Agenda on Feb. 13th, 2014===&lt;br /&gt;
* Discuss the Neutron SR-IOV's requirements on the nova generic PCI support, and their availability&lt;br /&gt;
** in the PCI information definition:&lt;br /&gt;
*** the pci device filter expression (I don't see it's given a name in https://wiki.openstack.org/wiki/PCI_passthrough_SRIOV_support_Icehouse) should support (which may be done as an enhancement).&lt;br /&gt;
**** specifying a physical function in the form of domain:bus:slot.func&lt;br /&gt;
**** specifying a physical function in the form of a ethernet interface name. &lt;br /&gt;
*** tagging with an attribute called &amp;quot;net-group&amp;quot; or simply &amp;quot;physical_network&amp;quot;. The tag name &amp;quot;phyical_network&amp;quot; now may make more sense based on the consensus reached on Feb. 12th.&lt;br /&gt;
** PCI stats based on the tag &amp;quot;physical_network&amp;quot;&lt;br /&gt;
** An API to retrieve a tag's value on a per PCI device basis, something like: get_pci_device_tag_value(pci_dev, tag_name)&lt;br /&gt;
** An API to create a PCI request for scheduling purpose&lt;br /&gt;
** An API to retrieve a PCI device that is linked to the original PCI request. &lt;br /&gt;
** The existing pci_manager.get_instance_pci_devs(instance) shouldn't return PCI devices that are allocated as a result of the aforementioned PCI requests.&lt;br /&gt;
&lt;br /&gt;
===Feb. 12th, 2014 Recap===&lt;br /&gt;
Consensus reached during this meeting:&lt;br /&gt;
* The binding:profile dictionary will now have these keys defined: 'physical_network', 'pci_vendor_info', 'pci_slot'.&lt;br /&gt;
** physical_network: its value is the physical network name that has been chosen for the nic (neutron port) to attach to. ML2 MD will use this information:&lt;br /&gt;
*** In the non-SR-IOV case with the agent-based MDs, the ML2 plugin's port binding code iterates over the registered MDs to try to bind, calling bind_port() on each. Within the AgentMechanismDriverBase.bind_port() implementation, it iterates over the network segments, calling check_segment_for_agent() on the derived class for each segment. The 1st segment that is tried for which the agent on the node identified by binding:host_id has a mapping for the segment's physical_network is used. &lt;br /&gt;
*** in the non-SR_IOV case, need to add a line of code in the existing agent-based MDs check_segment_for_agent() to make sure vnic_type == 'virtio', so it won't bind when SR-IOV is required. Irenab's vnic BP will take care of this.&lt;br /&gt;
*** in the SR-IOV case, the physical network names that a neutron port can potentially attach to will be used for scheduling, and the change to the scheduling filter in the case of multiprovidernet extension is TBD. &lt;br /&gt;
*** in the SR-IOV case, SR-IOV MDs will need to iterate over the segments looking for the 1st one that has network_type of 'vlan' and that has the physical_network specified in binding:profile:physical_network; the SR-IOV MDs can include the segment's segmentation_id within the binding:vif_details so that VIF driver can put that into the libvirt XML&lt;br /&gt;
** pci_vendor_info: its value is a string with the format &amp;quot;vendor_id:product_id&amp;quot;. Both vendor_id and product_id corresponds to the PCI device's vendor_id and product_id&lt;br /&gt;
** pci_slot: its value is a string with the format &amp;quot;domain:bus:slot.func&amp;quot; that correspond's to the PCI device's slot as named on a linux system.&lt;br /&gt;
*The binding:vif_details will have keys depending on the neutron port's vif type&lt;br /&gt;
** profileid: this key will be used to support the vif type VIF_TYPE_802_1QBH&lt;br /&gt;
** vlan_id: this key will be used to support the vif type VIF_TYPE_HW_VEB [irenab - neutron uses 'segmentation_id'. Let's pass it in the binding:vif_details]&lt;br /&gt;
* interface config and resulting interface XML will be generated based on both vnic_type and vif_type. The vnic_type, if not present as a key in the top level port dictionary, defaults to 'virtio'&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 28th, 2014===&lt;br /&gt;
[[nova-neutron-sriov]]&lt;br /&gt;
* Openstack Icehouse schedule: https://wiki.openstack.org/wiki/Icehouse_Release_Schedule&lt;br /&gt;
* Work Items for the initial release:&lt;br /&gt;
** Nova: generic PCI-passthrough [Nova folks to add details]&lt;br /&gt;
*** pci_information support, add tag/extra information to pci devices.&lt;br /&gt;
**** pci_information =  { { 'device_id': &amp;quot;8086&amp;quot;, 'vendor_id': &amp;quot;000[1-2]&amp;quot; }, { 'e.group' :'gpu' } } &lt;br /&gt;
*** pci flavor define attr can be used in the pci flavor and how pci stats report it's pool&lt;br /&gt;
**** pci_flavor_attrs = ['e.group']&lt;br /&gt;
*** pci schduler to support corresponding extra information.&lt;br /&gt;
** Nova: SRIOV&lt;br /&gt;
*** Dependencies on Nova Generic PCI-Passthrough&lt;br /&gt;
**** Support of PCI attribute sriov_group in the PCI passthrough device list&lt;br /&gt;
**** Support of PCI stats based on sriov_group&lt;br /&gt;
*** overal change breakdown&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** requested network and SRIOV request spec management &lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** SRIOV request spec--vif association&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding [irenab: vnic_type, pci slot record]&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface/network xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
** Neutron:&lt;br /&gt;
**** enhance neutron port-create to support vnic-type and port profile [ irenab: pci slot record]&lt;br /&gt;
**** to support the enhanced port binding and as a result API changes in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [Might not be needed]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 27th, 2014===&lt;br /&gt;
* Main focus is on SRIOV&lt;br /&gt;
* References:&lt;br /&gt;
**https://docs.google.com/document/d/1RfxfXBNB0mD_kH9SamwqPI8ZM-jg797ky_Fze7SakRc/edit?pli=1&lt;br /&gt;
**https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit?pli=1#&lt;br /&gt;
* Some ideas that came out of discussions &lt;br /&gt;
** Assuming there is an attribute (based on pci flavor terminology) for sriov, which name is yet to be determined. Call it sriov_group temporarily for reference in below&lt;br /&gt;
** Assuming PCI stats will be supported based on this attribute&lt;br /&gt;
** Assuming for each physical network that's supported in the cloud, there is a corresponding sriov_group. To make it simple, say if there are two physical networks: physnet1 and physnet2, then there are two sriov_groups named physnet1 and physnet2&lt;br /&gt;
** sriov devices in the pci passthrough device list (the pci whitelist) will be tagged by &amp;quot;sriov_group: physnet1&amp;quot; or &amp;quot;sriov_group: physnet2&amp;quot; based on which physical network the device belongs to.&lt;br /&gt;
** Initially, we don't have to change nova CLI/API. Instead, the neutron port-create will be enhanced to support the following new arguments:&lt;br /&gt;
*** --vnic-type = “vnic” | “direct” | “macvtap”. OPTIONAL with default as &amp;quot;vnic&amp;quot;. The actually names of the three possible vnic types for further discussion&lt;br /&gt;
*** port-profile=port-profile-name for support of IEEE802.1BR. OPTIONAL.&lt;br /&gt;
*** pci-flavor=pci-flavor-name. Support of this argument is debatable. If sriov devices can be used outside of the physical network, or it's desirable to further partition a physical network, it might be necessary to introduce this argument. In that case, pci flavors need to be explicitly created once it's available. This argument may not be needed initially.&lt;br /&gt;
** to create a VM with sriov NICs&lt;br /&gt;
*** Configuration on the controller node: pci attribute sriov_group&lt;br /&gt;
*** configurations on a compute node: physical networks as required by the neutron plugin, pci passthrough device list that are properly tagged with sriov_group.&lt;br /&gt;
*** neutron net-create that may be provided with the provider network name, or otherwise uses default physical network name as configured in the neutron plugin&lt;br /&gt;
*** neutron port-create --vnic-type direct &amp;lt;net-uuid&amp;gt;&lt;br /&gt;
*** nova boot --flavor m1.large --image &amp;lt;image-uuid&amp;gt; --nic port-id=&amp;lt;port-uuid-from-port-create&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Possible Work Items&lt;br /&gt;
** Existing BPs that are relevant based on the above&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
*** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
** The above BPs may be redefined or new BPs can be created based on the actual work items.&lt;br /&gt;
** Roughly speaking, there are the following work items&lt;br /&gt;
*** nova side: a proof of concept patch is captured in here: https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?pli=1 and https://review.openstack.org/67500&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** although no changes to --nic options for now, the semantics of the port-id parameter is enhanced to support sriov. Basically, if it's a sriov port, request_specs for scheduling should be created and managed. &lt;br /&gt;
***** how do we address this requirement that a compute node may support SRIOV port only, a new filter or enhancement to the existing pci passthrough filter? [irenab - May use host aggregate ]&lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** Nova compute manager to associate a requested network with a request spec, thus corresponds a requested network with a PCI device that is allocated for it&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
*** neutron side:&lt;br /&gt;
**** to support the enhanced port binding in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [irenab - if we use binding:profile, there should be no changes to existing support]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 15th, 2014===&lt;br /&gt;
* Ian's proposal for flavor and backend tagging: https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit#&lt;br /&gt;
* Review this against known use cases&lt;br /&gt;
* Document any use cases not in that document&lt;br /&gt;
=== Agenda on Jan. 14th 2014===&lt;br /&gt;
* PCI group versus PCI flavor: let's sort out what exactly they are, APIs around them, and pros and cons of each. &lt;br /&gt;
* Please check [https://wiki.openstack.org/wiki/Meetings/Passthrough#POC_Implementation]&lt;br /&gt;
* Division of works&lt;br /&gt;
&lt;br /&gt;
=== POC Implementation ===&lt;br /&gt;
See [https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?usp=sharing POC implementation] &lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
A specific PCI attachment (could by a virtual function) is described by:&lt;br /&gt;
* vendor_id&lt;br /&gt;
* product_id&lt;br /&gt;
* address&lt;br /&gt;
&lt;br /&gt;
There is a whitelist (at the moment):&lt;br /&gt;
* which devices on a specific hypervisor host can be exposed&lt;br /&gt;
&lt;br /&gt;
There is an alias (at the moment):&lt;br /&gt;
* groupings of PCI devices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The user view of system ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough, we need things like:&lt;br /&gt;
* user request a &amp;quot;large&amp;quot; GPU&lt;br /&gt;
* could be from various vendors or product versions&lt;br /&gt;
&lt;br /&gt;
For network, we need things like:&lt;br /&gt;
* user requests a nic for a specific neutron network&lt;br /&gt;
* they want to say if it's virtual (the default type) or passthrough (super fast, slow, etc)&lt;br /&gt;
* this includes groups by address (virtual function, etc) so it's specific to a particular _group_ of neutron network, each with specific configurations (e.g. VLAN id, a NIC attached to a specific provider network)&lt;br /&gt;
* or it involves a NIC that can be programmatically made to attach to a specific neutron network&lt;br /&gt;
&lt;br /&gt;
==== The user view of requesting things ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough:&lt;br /&gt;
* user requests a flavor extra specs *imply* which possible PCI devices can be connected&lt;br /&gt;
* nova boot --image some_image --flavor flavor_that_has_big_GPU_attached some_name&lt;br /&gt;
&lt;br /&gt;
The admin would expose a flavor that gives you, for example, one large GPU and one small GPU:&lt;br /&gt;
* nova flavor-key  m1.large set  &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot; large_GPU:1,small_GPU:1&amp;quot;&lt;br /&gt;
* TODO - this may change in the future&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For SRIOV:&lt;br /&gt;
* in the most basic case, the user may be given direct access to a network card, just like we do with GPU, but this is less useful than...&lt;br /&gt;
* user requests neutron nics, on specific neutron networks, but connected in a specific way (i.e. high speed SRIOV vs virtual)&lt;br /&gt;
* note that some of the nics may be virtual, some may be passthrough, and some might be a different type of passthrough&lt;br /&gt;
* nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id&amp;gt;,nic-type=&amp;lt;slow | fast | foobar&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* (where slow is a virtual connection, fast is a PCI passthrough, and foobar is some other type of PCI passthrough)&lt;br /&gt;
* consider several nics, of different types: nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id-1&amp;gt; --nic net-id=&amp;lt;net-id-2&amp;gt;,nic-type=fast --nic net-id=&amp;lt;net-id-3&amp;gt;,nic-type=faster  &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* when hot-plugging hot-unplugging, we also need to specify vnic-type in a similar way&lt;br /&gt;
* also, this should work nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic port-id=&amp;lt;port-id&amp;gt;, given&lt;br /&gt;
* quantum port-create --fixed-ip subnet_id=&amp;lt;subnet-id&amp;gt;,ip_address=192.168.57.101 &amp;lt;net-id&amp;gt; --nic-type=&amp;lt;slow | fast | foobar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: need agreement, but one idea for admin...&lt;br /&gt;
* pci_alias_1='{&amp;quot;name&amp;quot;:&amp;quot;Cisco.VIC&amp;quot;, devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;, &amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;fast&amp;quot;}'&lt;br /&gt;
* pci_alias_2='{&amp;quot;name&amp;quot;:&amp;quot;Fast&amp;quot;,devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;direct&amp;quot;}, {&amp;quot;vendor_id&amp;quot;:&amp;quot;123&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0081&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;faster&amp;quot;, }'&lt;br /&gt;
&lt;br /&gt;
==== New Proposal for admin view ====&lt;br /&gt;
&lt;br /&gt;
Whitelist:&lt;br /&gt;
* only certain devices exposed to Nova&lt;br /&gt;
* just a list of addresses that are allowed (including wildcards)&lt;br /&gt;
* by default, nothing is allowed&lt;br /&gt;
* this is assumed to be (mostly) static for the lifetime of the machine&lt;br /&gt;
* contained in nova.conf&lt;br /&gt;
&lt;br /&gt;
PCI flavors:&lt;br /&gt;
* specify groups of PCI devices, to be used in Neutron port descriptions or Server flavor extra specs&lt;br /&gt;
* configured using host aggregates API:&lt;br /&gt;
** a combination of whitelist, alias and group&lt;br /&gt;
** raw device passthrough (grouped by device_id and product_id)&lt;br /&gt;
** network device passthrough (grouped by device address also)&lt;br /&gt;
** note: there might be several options for each (GPU v3 and GPU v4 in a single flavor)&lt;br /&gt;
* only servers in the aggregate will be considered by the scheduler for each PCI flavor&lt;br /&gt;
* these are shared across the whole child cell (or if no cells, whole nova deploy)&lt;br /&gt;
&lt;br /&gt;
Scheduler updates:&lt;br /&gt;
* on periodic update, report current status of devices&lt;br /&gt;
* if any devices are in the whitelist, look up host aggregates to check what device types to report&lt;br /&gt;
* report the number of free devices per PCI flavor&lt;br /&gt;
* device usage tracked by resource manager as normal, looking at all devices in whitelist&lt;br /&gt;
&lt;br /&gt;
On attach of PCI device:&lt;br /&gt;
* scheduler picks host it things has a free device&lt;br /&gt;
* check with resource manage in usual way&lt;br /&gt;
* assign device to VM&lt;br /&gt;
* ignoring migration for now&lt;br /&gt;
&lt;br /&gt;
On attach of VIF device (through boot or otherwise):&lt;br /&gt;
* TBD... very sketchy plan...&lt;br /&gt;
* ideally neutron port contains associated PCI flavor/alias, or its assumed to be a virtual port&lt;br /&gt;
* neutron supplies the usual information, VLAN-id, etc&lt;br /&gt;
* neutron and nova negotiate which VIF driver to use, in usual way, given extra info about nic-type from PCI alias settings, etc&lt;br /&gt;
* VIF driver given a hypervisor agnostic lib to attach the PCI device, extracted from Nova attach PCI device code&lt;br /&gt;
* VIF driver is free to configure the specific PCI device before attaching it using the callback into the Nova driver (or modify Nova code to extend the create API)&lt;br /&gt;
&lt;br /&gt;
=== Agenda on Jan. 8th, 2014 ===&lt;br /&gt;
&lt;br /&gt;
:Let's go over the key concepts and use cases. In the use cases, neutron or neutron plugin specific configurations are not mentioned.&lt;br /&gt;
&lt;br /&gt;
==== Key Concepts ====&lt;br /&gt;
'''Note that paragraphs with ''Itablic'' text were added by Iawells as comments.'''&lt;br /&gt;
* PCI Groups&lt;br /&gt;
:# A PCI group is a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud.&lt;br /&gt;
&lt;br /&gt;
''In fact, two proposals exist for PCI group definition - via API, with the implication that they're stored centrally in the database, and via config, specifically a (match expression -&amp;gt; PCI group name) in the compute node configuration.  A competing proposal is PCI aliases, which work on the current assumption that all PCI device data is returned to the database and PCI devices can be selected by doing matching at schedule time and thus a name -&amp;gt; match expression mapping is all that need be saved.  Thus the internal question of &amp;quot;should all device information be returned to the controller&amp;quot; drives some of the design options.'' &lt;br /&gt;
&lt;br /&gt;
:# it's worth mentioning that using an API to define PCI groups make them owned by the tenant who creates them.&lt;br /&gt;
&lt;br /&gt;
* Pre-defined PCI Groups&lt;br /&gt;
:For each PCI device class that openstack supports, a PCI group is defined and associated with the PCI devices belonging to that device class. For example, for the PCI device class ''net'', there is a predefined PCI group named ''net''&lt;br /&gt;
&lt;br /&gt;
* User-defined PCI Groups&lt;br /&gt;
:User can define PCI groups using a Nova API.&lt;br /&gt;
&lt;br /&gt;
* PCI Passthrough List (whitelist)&lt;br /&gt;
:# Specified on a compute node to define all the PCI passthrough devices and their associated PCI groups that are available on the node.&lt;br /&gt;
:# blacklist (exclude list) may be added later if deemed necessary.&lt;br /&gt;
&lt;br /&gt;
* vnic_type: &lt;br /&gt;
:# virtio: a virtual port that is attached to a virtual switch&lt;br /&gt;
:# direct: SRIOV without macvtap&lt;br /&gt;
:# macvtap: SRIOV with macvtap&lt;br /&gt;
''This configuration item is not essential to PCI passthrough.  It's also a Neutron configuration item.''&lt;br /&gt;
&lt;br /&gt;
* nova boot: new parameters in --nic option&lt;br /&gt;
:# vnic-type=“vnic” | “direct” | “macvtap”&lt;br /&gt;
:# pci-group=pci-group-name&lt;br /&gt;
:# port-profile=port-profile-name ''This property is not related directly to use of PCI passthrough for networks.  It is a requirement of 802.1BR-based systems.''&lt;br /&gt;
&lt;br /&gt;
* neutron port-create: new arguments&lt;br /&gt;
:# --vnic-type “vnic” | “direct” | “macvtap”&lt;br /&gt;
:# --pci-group pci-group-name&lt;br /&gt;
:# port-profile port-profile-name&lt;br /&gt;
&lt;br /&gt;
* Nova SRIOV Configuration&lt;br /&gt;
:# vnic_type = &amp;lt;vnic-type&amp;gt;: specified in controller node to indicate the default vnic-type that VMs will be booted with. default value is &amp;quot;vnic&amp;quot;&lt;br /&gt;
:# sriov_auto_all = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that all sriov capable ports are added into the ‘net’ PCI group.&lt;br /&gt;
:# sriov_only = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that nova can only place VMs with sriov vnics onto these nodes. Default value is on for nodes with SRIOV ports. &lt;br /&gt;
:# sriov_pci_group = &amp;lt;pci-group-name&amp;gt;: specified in compute nodes in which all of its SRIOV ports belong to a single pci group.&lt;br /&gt;
''The SRIOV cofiguration items are enhancements to the base proposal that make it much easier to configure compute hosts where it is known that all VFs will be available to cloud users.''&lt;br /&gt;
&lt;br /&gt;
==== Use Cases ====&lt;br /&gt;
''These use cases do not include non-network passthrough cases.''&lt;br /&gt;
* SRIOV based cloud&lt;br /&gt;
:# All the compute nodes are identical and all the NICs are SRIOV based&lt;br /&gt;
:# All the NICs are connected to the same physical network&lt;br /&gt;
&lt;br /&gt;
:In this cloud, the admin only needs to specify vnic_type=direct on the controller and sriov_auto_all=on on the compute nodes in the nova configuration file. In addition, the new arguments introduced in the nova boot command are not required.&lt;br /&gt;
&lt;br /&gt;
* A cloud with mixed Vnics&lt;br /&gt;
:# On compute nodes with sriov ports only, set sriov_auto_all = on&lt;br /&gt;
:# On compute nodes without sriov ports, no change is required&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov vnic, the nova boot command would look like:&lt;br /&gt;
&lt;br /&gt;
    nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt;&lt;br /&gt;
                           --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=direct &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This will require some minimum change in the existing applications.&lt;br /&gt;
&lt;br /&gt;
* A Cloud that requires multiple SRIOV PCI groups&lt;br /&gt;
:# create all the pci-groups in the cloud by invoking a Nova API&lt;br /&gt;
:# on compute nodes that support a single pci group and in which all of the SRIOV ports belong to this group, set sriov_auto_all=on, sriov_pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# on compute nodes that support multiple pci groups, define the pci-passthrough-list&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov macvtap, the nova boot command would look like:&lt;br /&gt;
     nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; &lt;br /&gt;
                    --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=macvtap,pci-group=&amp;lt;group-name&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introducing new compute nodes with SRIOV into an existing cloud&lt;br /&gt;
:Depending on the cloud and the compute node being introduced:&lt;br /&gt;
:# it could be as simple as adding sriov_auto_all=on into the nova config file&lt;br /&gt;
:# it could be setting sriov_auto_all=on and pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# it could be defining the pci-passthrough-list.&lt;br /&gt;
&lt;br /&gt;
* NIC hot plug&lt;br /&gt;
&lt;br /&gt;
=== Evolving Design Doc ===&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Ian typed up a complete proposal in two sections in that document, which is pulled out here: https://docs.google.com/document/d/1svN89UXKbFoka0EF6MFUP6OwdNvhY4OkdjEZN-rD-0Q/edit#  - this proposal takes the 'PCI groups via compute node config' approach and makes no attempt at proposing APIs.&lt;br /&gt;
&lt;br /&gt;
=== Previous Meetings ===&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough_meeting/2013/pci_passthrough_meeting.2013-12-24-14.02.log.html&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough/&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on Dec. 17th, 2013'''&lt;br /&gt;
[[Meetings/Passthrough/dec-17th-2013.log]]&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on June. 17th, 2014'''&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/passthrough/2014/passthrough.2014-06-17-13.07.log.html&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56598</id>
		<title>Meetings/Passthrough</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56598"/>
				<updated>2014-06-24T11:41:51Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Agenda on May 26th, 2014 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next meeting will be on Wed May 7th at 1300 UTC on #openstack-meeting-alt&lt;br /&gt;
&lt;br /&gt;
=== Agenda on Jun 24th, 2014 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Agenda on May 26th, 2014 ===&lt;br /&gt;
* Nova SR-IOV networking&lt;br /&gt;
** [https://review.openstack.org/#/c/86606/ nova spec review]&lt;br /&gt;
** patch submission soon&lt;br /&gt;
** tempest tests&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://review.openstack.org/#/c/82206/ Init PCI manager after compute node initialization]&lt;br /&gt;
** [https://review.openstack.org/#/c/81954/ makes sure correct PCI device allocation]&lt;br /&gt;
* Other works/features&lt;br /&gt;
** Live migration&lt;br /&gt;
** Attach SR-IOV port to an existing instance&lt;br /&gt;
** possibly changing the names of existing vnic-types&lt;br /&gt;
** associate a default vnic-type with a neutron network&lt;br /&gt;
** admin controlled knobs&lt;br /&gt;
** HA &lt;br /&gt;
** others&lt;br /&gt;
&lt;br /&gt;
=== Agenda on March 25th, 2014 ===&lt;br /&gt;
* PCI SR-IOV Networking use case&lt;br /&gt;
Refer to https://docs.google.com/document/d/1zgMaXqrCnad01-jQH7Mkmf6amlghw9RMScGLBrKslmw/edit&lt;br /&gt;
&lt;br /&gt;
=== Recap of Discussions ===&lt;br /&gt;
==== Current PCI Passthrough ====&lt;br /&gt;
&lt;br /&gt;
* How to Use Wiki: https://wiki.openstack.org/wiki/Pci_passthrough&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: defines all the PCI passthrough devices that are available on a compute node. It's currently based on &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt;&lt;br /&gt;
* PCI stats group: defines the keys based on which a PCI device is accounted. It's currently based on the keys: &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;extra_info or simply PCI address of a physical function&amp;gt;. &lt;br /&gt;
* PCI Alias: specifies a list of PCI device requirements. A PCI requirement specifies a dictionary with keys: &amp;lt;alias name&amp;gt; &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;device_type&amp;gt;. Multiple requirements can be specified per PCI Alias with the same &amp;lt;device_type&amp;gt; (which may not work yet due to bugs). &amp;lt;alias name&amp;gt; is required. Others are optional.&lt;br /&gt;
* Nova Server Flavor: PCI requirements can be added into a nova flavor as it's extra-spec in the syntax &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot;&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;{,&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;}&amp;quot; &lt;br /&gt;
* PCI Passthrough filter for nova scheduler: this filter works based on the PCI stats group and PCI aliases referenced in the nova flavor. If mutliple aliases exist in the flavor, all of the them have to be satified. If multiple PCI requirements exist in one PCI alias, only one of the requirements defined in the alias needs to be satisfied. Suppose a PCI requirement is represented as R, and a PCI alias as (R1 OR R2 OR ...):count. Further assuming two PCI aliases, with the first one having two PCI requirements, with the second having one PCI requirement. Logically speaking, in order to choose a host as candidate, it must satisfy &lt;br /&gt;
        (R11 OR R12):count AND R21:count&lt;br /&gt;
&lt;br /&gt;
Given a PCI requirement, it's used to match against PCI stats groups until one or multiple matches are found to satisfy the count. Note that matching is based on the keys existing in the PCI requirement. Therefore it's possible for a PCI requirement to be matching multiple PCI stats groups.  &lt;br /&gt;
&lt;br /&gt;
==== Motivation for enhancement ====&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work if a compute node has multiple vNICs from the same vendor that are not used in the same way.&lt;br /&gt;
* PCI requirement only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work when the vNIC ports are connected to different physical networks . In other words, PCI devices from the same vendor may not be treated equally when it comes to choose vNIC ports for a VM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== What we have discussed so far to satisfy the above requirements ====&lt;br /&gt;
&lt;br /&gt;
===== PCI Group =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit#heading=h.30de7p6sgoxp. The doc becomes messy and almost unreadable. But refer to https://wiki.openstack.org/wiki/Meetings/Passthrough#Agenda_on_Jan._8th.2C_2014 for the main ideas behind it.&lt;br /&gt;
* PCI Group: a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud&lt;br /&gt;
* PCI whitelist: each entry is defined as a tuple of &amp;lt;device-filter, pci-group-name&amp;gt;. The device-filter uses vendor_id, product_id and PCI addresses to specify a collection of PCI devices. &lt;br /&gt;
* PCI stats group: each PCI group is a PCI stats group&lt;br /&gt;
* PCI Alias: alias is no longer needed&lt;br /&gt;
* Nova Server Flavor: Use G to represent a PCI group. An exampel of PCI requirements can be specified as:&lt;br /&gt;
                  (G1 OR G2):count AND G3:count&lt;br /&gt;
It defines that the VM needs &amp;quot;count&amp;quot; of PCI devices that are either from G1 or G2, and 'count&amp;quot; of PCI devices from G3.&lt;br /&gt;
&lt;br /&gt;
It supports only one well-defined tag called PCI group, which is considered too limited by some of the folks. &lt;br /&gt;
It simplifies the existing implementation without losing any of its capabilities (or use cases the current implementation can support).&lt;br /&gt;
&lt;br /&gt;
===== PCI Flavor =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: it's called PCI information in the above wiki&lt;br /&gt;
* PCI stats group: not clearly defined&lt;br /&gt;
* PCI flavor Attributes: refer to the wiki&lt;br /&gt;
* PCI flavor API: refer to the wiki&lt;br /&gt;
&lt;br /&gt;
This can be considered a generalized version of PCI Group as it supports arbitrary number of arbitrary tags. But system behaviors (PCI stats groups and scheduling, for example) are not clearly specified. Use cases to justify it is yet to be established.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Host Aggregate =====&lt;br /&gt;
&lt;br /&gt;
It was brought up during the discussion that the existing host aggregate may be used to support the new requirement. A couple of issues with host aggregate were discussed:&lt;br /&gt;
* it doesn't support dynamic host join to a host aggregate&lt;br /&gt;
* scheduling with host aggregate is not stats based.&lt;br /&gt;
&lt;br /&gt;
===== Nic Type/Flavor =====&lt;br /&gt;
Refer to http://lists.openstack.org/pipermail/openstack-dev/2014-January/023981.html and http://lists.openstack.org/pipermail/openstack-dev/2013-December/022737.html&lt;br /&gt;
&lt;br /&gt;
===== A compromised implementation =====&lt;br /&gt;
to speed up the development and facilitate integration testing with neutron.&lt;br /&gt;
Refer to https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov. Also refer to the submitted patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BPs &amp;amp; Patches ===&lt;br /&gt;
==== Neutron Side ====&lt;br /&gt;
* RKukura (binding:vif_details and binding:profile)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/vif-details&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-binding-profile&lt;br /&gt;
* Sadasu (Cisco MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-ucs-manager-mechanism-driver&lt;br /&gt;
* Irenab (vnic_type and mlnx MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-sriov-nic-switch&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/mlnx-ml2-support&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
* Baoli (for anything else that's needed for SRIOV in neutron)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
&lt;br /&gt;
==== Nova Side ====&lt;br /&gt;
* Baoli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
* Yongli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info&lt;br /&gt;
* Yunhong&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info-icehouse&lt;br /&gt;
&lt;br /&gt;
==== Itzik's patch to add physical network in VIF ====&lt;br /&gt;
https://review.openstack.org/#/c/59093/&lt;br /&gt;
&lt;br /&gt;
===Agenda on Feb. 13th, 2014===&lt;br /&gt;
* Discuss the Neutron SR-IOV's requirements on the nova generic PCI support, and their availability&lt;br /&gt;
** in the PCI information definition:&lt;br /&gt;
*** the pci device filter expression (I don't see it's given a name in https://wiki.openstack.org/wiki/PCI_passthrough_SRIOV_support_Icehouse) should support (which may be done as an enhancement).&lt;br /&gt;
**** specifying a physical function in the form of domain:bus:slot.func&lt;br /&gt;
**** specifying a physical function in the form of a ethernet interface name. &lt;br /&gt;
*** tagging with an attribute called &amp;quot;net-group&amp;quot; or simply &amp;quot;physical_network&amp;quot;. The tag name &amp;quot;phyical_network&amp;quot; now may make more sense based on the consensus reached on Feb. 12th.&lt;br /&gt;
** PCI stats based on the tag &amp;quot;physical_network&amp;quot;&lt;br /&gt;
** An API to retrieve a tag's value on a per PCI device basis, something like: get_pci_device_tag_value(pci_dev, tag_name)&lt;br /&gt;
** An API to create a PCI request for scheduling purpose&lt;br /&gt;
** An API to retrieve a PCI device that is linked to the original PCI request. &lt;br /&gt;
** The existing pci_manager.get_instance_pci_devs(instance) shouldn't return PCI devices that are allocated as a result of the aforementioned PCI requests.&lt;br /&gt;
&lt;br /&gt;
===Feb. 12th, 2014 Recap===&lt;br /&gt;
Consensus reached during this meeting:&lt;br /&gt;
* The binding:profile dictionary will now have these keys defined: 'physical_network', 'pci_vendor_info', 'pci_slot'.&lt;br /&gt;
** physical_network: its value is the physical network name that has been chosen for the nic (neutron port) to attach to. ML2 MD will use this information:&lt;br /&gt;
*** In the non-SR-IOV case with the agent-based MDs, the ML2 plugin's port binding code iterates over the registered MDs to try to bind, calling bind_port() on each. Within the AgentMechanismDriverBase.bind_port() implementation, it iterates over the network segments, calling check_segment_for_agent() on the derived class for each segment. The 1st segment that is tried for which the agent on the node identified by binding:host_id has a mapping for the segment's physical_network is used. &lt;br /&gt;
*** in the non-SR_IOV case, need to add a line of code in the existing agent-based MDs check_segment_for_agent() to make sure vnic_type == 'virtio', so it won't bind when SR-IOV is required. Irenab's vnic BP will take care of this.&lt;br /&gt;
*** in the SR-IOV case, the physical network names that a neutron port can potentially attach to will be used for scheduling, and the change to the scheduling filter in the case of multiprovidernet extension is TBD. &lt;br /&gt;
*** in the SR-IOV case, SR-IOV MDs will need to iterate over the segments looking for the 1st one that has network_type of 'vlan' and that has the physical_network specified in binding:profile:physical_network; the SR-IOV MDs can include the segment's segmentation_id within the binding:vif_details so that VIF driver can put that into the libvirt XML&lt;br /&gt;
** pci_vendor_info: its value is a string with the format &amp;quot;vendor_id:product_id&amp;quot;. Both vendor_id and product_id corresponds to the PCI device's vendor_id and product_id&lt;br /&gt;
** pci_slot: its value is a string with the format &amp;quot;domain:bus:slot.func&amp;quot; that correspond's to the PCI device's slot as named on a linux system.&lt;br /&gt;
*The binding:vif_details will have keys depending on the neutron port's vif type&lt;br /&gt;
** profileid: this key will be used to support the vif type VIF_TYPE_802_1QBH&lt;br /&gt;
** vlan_id: this key will be used to support the vif type VIF_TYPE_HW_VEB [irenab - neutron uses 'segmentation_id'. Let's pass it in the binding:vif_details]&lt;br /&gt;
* interface config and resulting interface XML will be generated based on both vnic_type and vif_type. The vnic_type, if not present as a key in the top level port dictionary, defaults to 'virtio'&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 28th, 2014===&lt;br /&gt;
[[nova-neutron-sriov]]&lt;br /&gt;
* Openstack Icehouse schedule: https://wiki.openstack.org/wiki/Icehouse_Release_Schedule&lt;br /&gt;
* Work Items for the initial release:&lt;br /&gt;
** Nova: generic PCI-passthrough [Nova folks to add details]&lt;br /&gt;
*** pci_information support, add tag/extra information to pci devices.&lt;br /&gt;
**** pci_information =  { { 'device_id': &amp;quot;8086&amp;quot;, 'vendor_id': &amp;quot;000[1-2]&amp;quot; }, { 'e.group' :'gpu' } } &lt;br /&gt;
*** pci flavor define attr can be used in the pci flavor and how pci stats report it's pool&lt;br /&gt;
**** pci_flavor_attrs = ['e.group']&lt;br /&gt;
*** pci schduler to support corresponding extra information.&lt;br /&gt;
** Nova: SRIOV&lt;br /&gt;
*** Dependencies on Nova Generic PCI-Passthrough&lt;br /&gt;
**** Support of PCI attribute sriov_group in the PCI passthrough device list&lt;br /&gt;
**** Support of PCI stats based on sriov_group&lt;br /&gt;
*** overal change breakdown&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** requested network and SRIOV request spec management &lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** SRIOV request spec--vif association&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding [irenab: vnic_type, pci slot record]&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface/network xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
** Neutron:&lt;br /&gt;
**** enhance neutron port-create to support vnic-type and port profile [ irenab: pci slot record]&lt;br /&gt;
**** to support the enhanced port binding and as a result API changes in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [Might not be needed]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 27th, 2014===&lt;br /&gt;
* Main focus is on SRIOV&lt;br /&gt;
* References:&lt;br /&gt;
**https://docs.google.com/document/d/1RfxfXBNB0mD_kH9SamwqPI8ZM-jg797ky_Fze7SakRc/edit?pli=1&lt;br /&gt;
**https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit?pli=1#&lt;br /&gt;
* Some ideas that came out of discussions &lt;br /&gt;
** Assuming there is an attribute (based on pci flavor terminology) for sriov, which name is yet to be determined. Call it sriov_group temporarily for reference in below&lt;br /&gt;
** Assuming PCI stats will be supported based on this attribute&lt;br /&gt;
** Assuming for each physical network that's supported in the cloud, there is a corresponding sriov_group. To make it simple, say if there are two physical networks: physnet1 and physnet2, then there are two sriov_groups named physnet1 and physnet2&lt;br /&gt;
** sriov devices in the pci passthrough device list (the pci whitelist) will be tagged by &amp;quot;sriov_group: physnet1&amp;quot; or &amp;quot;sriov_group: physnet2&amp;quot; based on which physical network the device belongs to.&lt;br /&gt;
** Initially, we don't have to change nova CLI/API. Instead, the neutron port-create will be enhanced to support the following new arguments:&lt;br /&gt;
*** --vnic-type = “vnic” | “direct” | “macvtap”. OPTIONAL with default as &amp;quot;vnic&amp;quot;. The actually names of the three possible vnic types for further discussion&lt;br /&gt;
*** port-profile=port-profile-name for support of IEEE802.1BR. OPTIONAL.&lt;br /&gt;
*** pci-flavor=pci-flavor-name. Support of this argument is debatable. If sriov devices can be used outside of the physical network, or it's desirable to further partition a physical network, it might be necessary to introduce this argument. In that case, pci flavors need to be explicitly created once it's available. This argument may not be needed initially.&lt;br /&gt;
** to create a VM with sriov NICs&lt;br /&gt;
*** Configuration on the controller node: pci attribute sriov_group&lt;br /&gt;
*** configurations on a compute node: physical networks as required by the neutron plugin, pci passthrough device list that are properly tagged with sriov_group.&lt;br /&gt;
*** neutron net-create that may be provided with the provider network name, or otherwise uses default physical network name as configured in the neutron plugin&lt;br /&gt;
*** neutron port-create --vnic-type direct &amp;lt;net-uuid&amp;gt;&lt;br /&gt;
*** nova boot --flavor m1.large --image &amp;lt;image-uuid&amp;gt; --nic port-id=&amp;lt;port-uuid-from-port-create&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Possible Work Items&lt;br /&gt;
** Existing BPs that are relevant based on the above&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
*** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
** The above BPs may be redefined or new BPs can be created based on the actual work items.&lt;br /&gt;
** Roughly speaking, there are the following work items&lt;br /&gt;
*** nova side: a proof of concept patch is captured in here: https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?pli=1 and https://review.openstack.org/67500&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** although no changes to --nic options for now, the semantics of the port-id parameter is enhanced to support sriov. Basically, if it's a sriov port, request_specs for scheduling should be created and managed. &lt;br /&gt;
***** how do we address this requirement that a compute node may support SRIOV port only, a new filter or enhancement to the existing pci passthrough filter? [irenab - May use host aggregate ]&lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** Nova compute manager to associate a requested network with a request spec, thus corresponds a requested network with a PCI device that is allocated for it&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
*** neutron side:&lt;br /&gt;
**** to support the enhanced port binding in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [irenab - if we use binding:profile, there should be no changes to existing support]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 15th, 2014===&lt;br /&gt;
* Ian's proposal for flavor and backend tagging: https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit#&lt;br /&gt;
* Review this against known use cases&lt;br /&gt;
* Document any use cases not in that document&lt;br /&gt;
=== Agenda on Jan. 14th 2014===&lt;br /&gt;
* PCI group versus PCI flavor: let's sort out what exactly they are, APIs around them, and pros and cons of each. &lt;br /&gt;
* Please check [https://wiki.openstack.org/wiki/Meetings/Passthrough#POC_Implementation]&lt;br /&gt;
* Division of works&lt;br /&gt;
&lt;br /&gt;
=== POC Implementation ===&lt;br /&gt;
See [https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?usp=sharing POC implementation] &lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
A specific PCI attachment (could by a virtual function) is described by:&lt;br /&gt;
* vendor_id&lt;br /&gt;
* product_id&lt;br /&gt;
* address&lt;br /&gt;
&lt;br /&gt;
There is a whitelist (at the moment):&lt;br /&gt;
* which devices on a specific hypervisor host can be exposed&lt;br /&gt;
&lt;br /&gt;
There is an alias (at the moment):&lt;br /&gt;
* groupings of PCI devices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The user view of system ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough, we need things like:&lt;br /&gt;
* user request a &amp;quot;large&amp;quot; GPU&lt;br /&gt;
* could be from various vendors or product versions&lt;br /&gt;
&lt;br /&gt;
For network, we need things like:&lt;br /&gt;
* user requests a nic for a specific neutron network&lt;br /&gt;
* they want to say if it's virtual (the default type) or passthrough (super fast, slow, etc)&lt;br /&gt;
* this includes groups by address (virtual function, etc) so it's specific to a particular _group_ of neutron network, each with specific configurations (e.g. VLAN id, a NIC attached to a specific provider network)&lt;br /&gt;
* or it involves a NIC that can be programmatically made to attach to a specific neutron network&lt;br /&gt;
&lt;br /&gt;
==== The user view of requesting things ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough:&lt;br /&gt;
* user requests a flavor extra specs *imply* which possible PCI devices can be connected&lt;br /&gt;
* nova boot --image some_image --flavor flavor_that_has_big_GPU_attached some_name&lt;br /&gt;
&lt;br /&gt;
The admin would expose a flavor that gives you, for example, one large GPU and one small GPU:&lt;br /&gt;
* nova flavor-key  m1.large set  &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot; large_GPU:1,small_GPU:1&amp;quot;&lt;br /&gt;
* TODO - this may change in the future&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For SRIOV:&lt;br /&gt;
* in the most basic case, the user may be given direct access to a network card, just like we do with GPU, but this is less useful than...&lt;br /&gt;
* user requests neutron nics, on specific neutron networks, but connected in a specific way (i.e. high speed SRIOV vs virtual)&lt;br /&gt;
* note that some of the nics may be virtual, some may be passthrough, and some might be a different type of passthrough&lt;br /&gt;
* nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id&amp;gt;,nic-type=&amp;lt;slow | fast | foobar&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* (where slow is a virtual connection, fast is a PCI passthrough, and foobar is some other type of PCI passthrough)&lt;br /&gt;
* consider several nics, of different types: nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id-1&amp;gt; --nic net-id=&amp;lt;net-id-2&amp;gt;,nic-type=fast --nic net-id=&amp;lt;net-id-3&amp;gt;,nic-type=faster  &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* when hot-plugging hot-unplugging, we also need to specify vnic-type in a similar way&lt;br /&gt;
* also, this should work nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic port-id=&amp;lt;port-id&amp;gt;, given&lt;br /&gt;
* quantum port-create --fixed-ip subnet_id=&amp;lt;subnet-id&amp;gt;,ip_address=192.168.57.101 &amp;lt;net-id&amp;gt; --nic-type=&amp;lt;slow | fast | foobar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: need agreement, but one idea for admin...&lt;br /&gt;
* pci_alias_1='{&amp;quot;name&amp;quot;:&amp;quot;Cisco.VIC&amp;quot;, devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;, &amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;fast&amp;quot;}'&lt;br /&gt;
* pci_alias_2='{&amp;quot;name&amp;quot;:&amp;quot;Fast&amp;quot;,devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;direct&amp;quot;}, {&amp;quot;vendor_id&amp;quot;:&amp;quot;123&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0081&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;faster&amp;quot;, }'&lt;br /&gt;
&lt;br /&gt;
==== New Proposal for admin view ====&lt;br /&gt;
&lt;br /&gt;
Whitelist:&lt;br /&gt;
* only certain devices exposed to Nova&lt;br /&gt;
* just a list of addresses that are allowed (including wildcards)&lt;br /&gt;
* by default, nothing is allowed&lt;br /&gt;
* this is assumed to be (mostly) static for the lifetime of the machine&lt;br /&gt;
* contained in nova.conf&lt;br /&gt;
&lt;br /&gt;
PCI flavors:&lt;br /&gt;
* specify groups of PCI devices, to be used in Neutron port descriptions or Server flavor extra specs&lt;br /&gt;
* configured using host aggregates API:&lt;br /&gt;
** a combination of whitelist, alias and group&lt;br /&gt;
** raw device passthrough (grouped by device_id and product_id)&lt;br /&gt;
** network device passthrough (grouped by device address also)&lt;br /&gt;
** note: there might be several options for each (GPU v3 and GPU v4 in a single flavor)&lt;br /&gt;
* only servers in the aggregate will be considered by the scheduler for each PCI flavor&lt;br /&gt;
* these are shared across the whole child cell (or if no cells, whole nova deploy)&lt;br /&gt;
&lt;br /&gt;
Scheduler updates:&lt;br /&gt;
* on periodic update, report current status of devices&lt;br /&gt;
* if any devices are in the whitelist, look up host aggregates to check what device types to report&lt;br /&gt;
* report the number of free devices per PCI flavor&lt;br /&gt;
* device usage tracked by resource manager as normal, looking at all devices in whitelist&lt;br /&gt;
&lt;br /&gt;
On attach of PCI device:&lt;br /&gt;
* scheduler picks host it things has a free device&lt;br /&gt;
* check with resource manage in usual way&lt;br /&gt;
* assign device to VM&lt;br /&gt;
* ignoring migration for now&lt;br /&gt;
&lt;br /&gt;
On attach of VIF device (through boot or otherwise):&lt;br /&gt;
* TBD... very sketchy plan...&lt;br /&gt;
* ideally neutron port contains associated PCI flavor/alias, or its assumed to be a virtual port&lt;br /&gt;
* neutron supplies the usual information, VLAN-id, etc&lt;br /&gt;
* neutron and nova negotiate which VIF driver to use, in usual way, given extra info about nic-type from PCI alias settings, etc&lt;br /&gt;
* VIF driver given a hypervisor agnostic lib to attach the PCI device, extracted from Nova attach PCI device code&lt;br /&gt;
* VIF driver is free to configure the specific PCI device before attaching it using the callback into the Nova driver (or modify Nova code to extend the create API)&lt;br /&gt;
&lt;br /&gt;
=== Agenda on Jan. 8th, 2014 ===&lt;br /&gt;
&lt;br /&gt;
:Let's go over the key concepts and use cases. In the use cases, neutron or neutron plugin specific configurations are not mentioned.&lt;br /&gt;
&lt;br /&gt;
==== Key Concepts ====&lt;br /&gt;
'''Note that paragraphs with ''Itablic'' text were added by Iawells as comments.'''&lt;br /&gt;
* PCI Groups&lt;br /&gt;
:# A PCI group is a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud.&lt;br /&gt;
&lt;br /&gt;
''In fact, two proposals exist for PCI group definition - via API, with the implication that they're stored centrally in the database, and via config, specifically a (match expression -&amp;gt; PCI group name) in the compute node configuration.  A competing proposal is PCI aliases, which work on the current assumption that all PCI device data is returned to the database and PCI devices can be selected by doing matching at schedule time and thus a name -&amp;gt; match expression mapping is all that need be saved.  Thus the internal question of &amp;quot;should all device information be returned to the controller&amp;quot; drives some of the design options.'' &lt;br /&gt;
&lt;br /&gt;
:# it's worth mentioning that using an API to define PCI groups make them owned by the tenant who creates them.&lt;br /&gt;
&lt;br /&gt;
* Pre-defined PCI Groups&lt;br /&gt;
:For each PCI device class that openstack supports, a PCI group is defined and associated with the PCI devices belonging to that device class. For example, for the PCI device class ''net'', there is a predefined PCI group named ''net''&lt;br /&gt;
&lt;br /&gt;
* User-defined PCI Groups&lt;br /&gt;
:User can define PCI groups using a Nova API.&lt;br /&gt;
&lt;br /&gt;
* PCI Passthrough List (whitelist)&lt;br /&gt;
:# Specified on a compute node to define all the PCI passthrough devices and their associated PCI groups that are available on the node.&lt;br /&gt;
:# blacklist (exclude list) may be added later if deemed necessary.&lt;br /&gt;
&lt;br /&gt;
* vnic_type: &lt;br /&gt;
:# virtio: a virtual port that is attached to a virtual switch&lt;br /&gt;
:# direct: SRIOV without macvtap&lt;br /&gt;
:# macvtap: SRIOV with macvtap&lt;br /&gt;
''This configuration item is not essential to PCI passthrough.  It's also a Neutron configuration item.''&lt;br /&gt;
&lt;br /&gt;
* nova boot: new parameters in --nic option&lt;br /&gt;
:# vnic-type=“vnic” | “direct” | “macvtap”&lt;br /&gt;
:# pci-group=pci-group-name&lt;br /&gt;
:# port-profile=port-profile-name ''This property is not related directly to use of PCI passthrough for networks.  It is a requirement of 802.1BR-based systems.''&lt;br /&gt;
&lt;br /&gt;
* neutron port-create: new arguments&lt;br /&gt;
:# --vnic-type “vnic” | “direct” | “macvtap”&lt;br /&gt;
:# --pci-group pci-group-name&lt;br /&gt;
:# port-profile port-profile-name&lt;br /&gt;
&lt;br /&gt;
* Nova SRIOV Configuration&lt;br /&gt;
:# vnic_type = &amp;lt;vnic-type&amp;gt;: specified in controller node to indicate the default vnic-type that VMs will be booted with. default value is &amp;quot;vnic&amp;quot;&lt;br /&gt;
:# sriov_auto_all = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that all sriov capable ports are added into the ‘net’ PCI group.&lt;br /&gt;
:# sriov_only = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that nova can only place VMs with sriov vnics onto these nodes. Default value is on for nodes with SRIOV ports. &lt;br /&gt;
:# sriov_pci_group = &amp;lt;pci-group-name&amp;gt;: specified in compute nodes in which all of its SRIOV ports belong to a single pci group.&lt;br /&gt;
''The SRIOV cofiguration items are enhancements to the base proposal that make it much easier to configure compute hosts where it is known that all VFs will be available to cloud users.''&lt;br /&gt;
&lt;br /&gt;
==== Use Cases ====&lt;br /&gt;
''These use cases do not include non-network passthrough cases.''&lt;br /&gt;
* SRIOV based cloud&lt;br /&gt;
:# All the compute nodes are identical and all the NICs are SRIOV based&lt;br /&gt;
:# All the NICs are connected to the same physical network&lt;br /&gt;
&lt;br /&gt;
:In this cloud, the admin only needs to specify vnic_type=direct on the controller and sriov_auto_all=on on the compute nodes in the nova configuration file. In addition, the new arguments introduced in the nova boot command are not required.&lt;br /&gt;
&lt;br /&gt;
* A cloud with mixed Vnics&lt;br /&gt;
:# On compute nodes with sriov ports only, set sriov_auto_all = on&lt;br /&gt;
:# On compute nodes without sriov ports, no change is required&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov vnic, the nova boot command would look like:&lt;br /&gt;
&lt;br /&gt;
    nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt;&lt;br /&gt;
                           --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=direct &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This will require some minimum change in the existing applications.&lt;br /&gt;
&lt;br /&gt;
* A Cloud that requires multiple SRIOV PCI groups&lt;br /&gt;
:# create all the pci-groups in the cloud by invoking a Nova API&lt;br /&gt;
:# on compute nodes that support a single pci group and in which all of the SRIOV ports belong to this group, set sriov_auto_all=on, sriov_pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# on compute nodes that support multiple pci groups, define the pci-passthrough-list&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov macvtap, the nova boot command would look like:&lt;br /&gt;
     nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; &lt;br /&gt;
                    --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=macvtap,pci-group=&amp;lt;group-name&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introducing new compute nodes with SRIOV into an existing cloud&lt;br /&gt;
:Depending on the cloud and the compute node being introduced:&lt;br /&gt;
:# it could be as simple as adding sriov_auto_all=on into the nova config file&lt;br /&gt;
:# it could be setting sriov_auto_all=on and pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# it could be defining the pci-passthrough-list.&lt;br /&gt;
&lt;br /&gt;
* NIC hot plug&lt;br /&gt;
&lt;br /&gt;
=== Evolving Design Doc ===&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Ian typed up a complete proposal in two sections in that document, which is pulled out here: https://docs.google.com/document/d/1svN89UXKbFoka0EF6MFUP6OwdNvhY4OkdjEZN-rD-0Q/edit#  - this proposal takes the 'PCI groups via compute node config' approach and makes no attempt at proposing APIs.&lt;br /&gt;
&lt;br /&gt;
=== Previous Meetings ===&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough_meeting/2013/pci_passthrough_meeting.2013-12-24-14.02.log.html&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough/&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on Dec. 17th, 2013'''&lt;br /&gt;
[[Meetings/Passthrough/dec-17th-2013.log]]&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on June. 17th, 2014'''&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/passthrough/2014/passthrough.2014-06-17-13.07.log.html&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56592</id>
		<title>Meetings/Passthrough</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56592"/>
				<updated>2014-06-24T11:32:13Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Agenda on May 26th, 2014 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next meeting will be on Wed May 7th at 1300 UTC on #openstack-meeting-alt&lt;br /&gt;
&lt;br /&gt;
=== Agenda on May 26th, 2014 ===&lt;br /&gt;
* Nova SR-IOV networking&lt;br /&gt;
** [https://review.openstack.org/#/c/86606/ nova spec review]&lt;br /&gt;
** patch submission soon&lt;br /&gt;
** tempest tests&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://review.openstack.org/#/c/82206/ Init PCI manager after compute node initialization]&lt;br /&gt;
** [https://review.openstack.org/#/c/81954/ makes sure correct PCI device allocation]&lt;br /&gt;
* Other works/features&lt;br /&gt;
** Live migration&lt;br /&gt;
** Attach SR-IOV port to an existing instance&lt;br /&gt;
** possibly changing the names of existing vnic-types&lt;br /&gt;
** associate a default vnic-type with a neutron network&lt;br /&gt;
** admin controlled knobs&lt;br /&gt;
** HA &lt;br /&gt;
** others&lt;br /&gt;
&lt;br /&gt;
=== Agenda on March 25th, 2014 ===&lt;br /&gt;
* PCI SR-IOV Networking use case&lt;br /&gt;
Refer to https://docs.google.com/document/d/1zgMaXqrCnad01-jQH7Mkmf6amlghw9RMScGLBrKslmw/edit&lt;br /&gt;
&lt;br /&gt;
=== Recap of Discussions ===&lt;br /&gt;
==== Current PCI Passthrough ====&lt;br /&gt;
&lt;br /&gt;
* How to Use Wiki: https://wiki.openstack.org/wiki/Pci_passthrough&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: defines all the PCI passthrough devices that are available on a compute node. It's currently based on &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt;&lt;br /&gt;
* PCI stats group: defines the keys based on which a PCI device is accounted. It's currently based on the keys: &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;extra_info or simply PCI address of a physical function&amp;gt;. &lt;br /&gt;
* PCI Alias: specifies a list of PCI device requirements. A PCI requirement specifies a dictionary with keys: &amp;lt;alias name&amp;gt; &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;device_type&amp;gt;. Multiple requirements can be specified per PCI Alias with the same &amp;lt;device_type&amp;gt; (which may not work yet due to bugs). &amp;lt;alias name&amp;gt; is required. Others are optional.&lt;br /&gt;
* Nova Server Flavor: PCI requirements can be added into a nova flavor as it's extra-spec in the syntax &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot;&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;{,&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;}&amp;quot; &lt;br /&gt;
* PCI Passthrough filter for nova scheduler: this filter works based on the PCI stats group and PCI aliases referenced in the nova flavor. If mutliple aliases exist in the flavor, all of the them have to be satified. If multiple PCI requirements exist in one PCI alias, only one of the requirements defined in the alias needs to be satisfied. Suppose a PCI requirement is represented as R, and a PCI alias as (R1 OR R2 OR ...):count. Further assuming two PCI aliases, with the first one having two PCI requirements, with the second having one PCI requirement. Logically speaking, in order to choose a host as candidate, it must satisfy &lt;br /&gt;
        (R11 OR R12):count AND R21:count&lt;br /&gt;
&lt;br /&gt;
Given a PCI requirement, it's used to match against PCI stats groups until one or multiple matches are found to satisfy the count. Note that matching is based on the keys existing in the PCI requirement. Therefore it's possible for a PCI requirement to be matching multiple PCI stats groups.  &lt;br /&gt;
&lt;br /&gt;
==== Motivation for enhancement ====&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work if a compute node has multiple vNICs from the same vendor that are not used in the same way.&lt;br /&gt;
* PCI requirement only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work when the vNIC ports are connected to different physical networks . In other words, PCI devices from the same vendor may not be treated equally when it comes to choose vNIC ports for a VM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== What we have discussed so far to satisfy the above requirements ====&lt;br /&gt;
&lt;br /&gt;
===== PCI Group =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit#heading=h.30de7p6sgoxp. The doc becomes messy and almost unreadable. But refer to https://wiki.openstack.org/wiki/Meetings/Passthrough#Agenda_on_Jan._8th.2C_2014 for the main ideas behind it.&lt;br /&gt;
* PCI Group: a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud&lt;br /&gt;
* PCI whitelist: each entry is defined as a tuple of &amp;lt;device-filter, pci-group-name&amp;gt;. The device-filter uses vendor_id, product_id and PCI addresses to specify a collection of PCI devices. &lt;br /&gt;
* PCI stats group: each PCI group is a PCI stats group&lt;br /&gt;
* PCI Alias: alias is no longer needed&lt;br /&gt;
* Nova Server Flavor: Use G to represent a PCI group. An exampel of PCI requirements can be specified as:&lt;br /&gt;
                  (G1 OR G2):count AND G3:count&lt;br /&gt;
It defines that the VM needs &amp;quot;count&amp;quot; of PCI devices that are either from G1 or G2, and 'count&amp;quot; of PCI devices from G3.&lt;br /&gt;
&lt;br /&gt;
It supports only one well-defined tag called PCI group, which is considered too limited by some of the folks. &lt;br /&gt;
It simplifies the existing implementation without losing any of its capabilities (or use cases the current implementation can support).&lt;br /&gt;
&lt;br /&gt;
===== PCI Flavor =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: it's called PCI information in the above wiki&lt;br /&gt;
* PCI stats group: not clearly defined&lt;br /&gt;
* PCI flavor Attributes: refer to the wiki&lt;br /&gt;
* PCI flavor API: refer to the wiki&lt;br /&gt;
&lt;br /&gt;
This can be considered a generalized version of PCI Group as it supports arbitrary number of arbitrary tags. But system behaviors (PCI stats groups and scheduling, for example) are not clearly specified. Use cases to justify it is yet to be established.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Host Aggregate =====&lt;br /&gt;
&lt;br /&gt;
It was brought up during the discussion that the existing host aggregate may be used to support the new requirement. A couple of issues with host aggregate were discussed:&lt;br /&gt;
* it doesn't support dynamic host join to a host aggregate&lt;br /&gt;
* scheduling with host aggregate is not stats based.&lt;br /&gt;
&lt;br /&gt;
===== Nic Type/Flavor =====&lt;br /&gt;
Refer to http://lists.openstack.org/pipermail/openstack-dev/2014-January/023981.html and http://lists.openstack.org/pipermail/openstack-dev/2013-December/022737.html&lt;br /&gt;
&lt;br /&gt;
===== A compromised implementation =====&lt;br /&gt;
to speed up the development and facilitate integration testing with neutron.&lt;br /&gt;
Refer to https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov. Also refer to the submitted patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BPs &amp;amp; Patches ===&lt;br /&gt;
==== Neutron Side ====&lt;br /&gt;
* RKukura (binding:vif_details and binding:profile)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/vif-details&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-binding-profile&lt;br /&gt;
* Sadasu (Cisco MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-ucs-manager-mechanism-driver&lt;br /&gt;
* Irenab (vnic_type and mlnx MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-sriov-nic-switch&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/mlnx-ml2-support&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
* Baoli (for anything else that's needed for SRIOV in neutron)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
&lt;br /&gt;
==== Nova Side ====&lt;br /&gt;
* Baoli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
* Yongli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info&lt;br /&gt;
* Yunhong&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info-icehouse&lt;br /&gt;
&lt;br /&gt;
==== Itzik's patch to add physical network in VIF ====&lt;br /&gt;
https://review.openstack.org/#/c/59093/&lt;br /&gt;
&lt;br /&gt;
===Agenda on Feb. 13th, 2014===&lt;br /&gt;
* Discuss the Neutron SR-IOV's requirements on the nova generic PCI support, and their availability&lt;br /&gt;
** in the PCI information definition:&lt;br /&gt;
*** the pci device filter expression (I don't see it's given a name in https://wiki.openstack.org/wiki/PCI_passthrough_SRIOV_support_Icehouse) should support (which may be done as an enhancement).&lt;br /&gt;
**** specifying a physical function in the form of domain:bus:slot.func&lt;br /&gt;
**** specifying a physical function in the form of a ethernet interface name. &lt;br /&gt;
*** tagging with an attribute called &amp;quot;net-group&amp;quot; or simply &amp;quot;physical_network&amp;quot;. The tag name &amp;quot;phyical_network&amp;quot; now may make more sense based on the consensus reached on Feb. 12th.&lt;br /&gt;
** PCI stats based on the tag &amp;quot;physical_network&amp;quot;&lt;br /&gt;
** An API to retrieve a tag's value on a per PCI device basis, something like: get_pci_device_tag_value(pci_dev, tag_name)&lt;br /&gt;
** An API to create a PCI request for scheduling purpose&lt;br /&gt;
** An API to retrieve a PCI device that is linked to the original PCI request. &lt;br /&gt;
** The existing pci_manager.get_instance_pci_devs(instance) shouldn't return PCI devices that are allocated as a result of the aforementioned PCI requests.&lt;br /&gt;
&lt;br /&gt;
===Feb. 12th, 2014 Recap===&lt;br /&gt;
Consensus reached during this meeting:&lt;br /&gt;
* The binding:profile dictionary will now have these keys defined: 'physical_network', 'pci_vendor_info', 'pci_slot'.&lt;br /&gt;
** physical_network: its value is the physical network name that has been chosen for the nic (neutron port) to attach to. ML2 MD will use this information:&lt;br /&gt;
*** In the non-SR-IOV case with the agent-based MDs, the ML2 plugin's port binding code iterates over the registered MDs to try to bind, calling bind_port() on each. Within the AgentMechanismDriverBase.bind_port() implementation, it iterates over the network segments, calling check_segment_for_agent() on the derived class for each segment. The 1st segment that is tried for which the agent on the node identified by binding:host_id has a mapping for the segment's physical_network is used. &lt;br /&gt;
*** in the non-SR_IOV case, need to add a line of code in the existing agent-based MDs check_segment_for_agent() to make sure vnic_type == 'virtio', so it won't bind when SR-IOV is required. Irenab's vnic BP will take care of this.&lt;br /&gt;
*** in the SR-IOV case, the physical network names that a neutron port can potentially attach to will be used for scheduling, and the change to the scheduling filter in the case of multiprovidernet extension is TBD. &lt;br /&gt;
*** in the SR-IOV case, SR-IOV MDs will need to iterate over the segments looking for the 1st one that has network_type of 'vlan' and that has the physical_network specified in binding:profile:physical_network; the SR-IOV MDs can include the segment's segmentation_id within the binding:vif_details so that VIF driver can put that into the libvirt XML&lt;br /&gt;
** pci_vendor_info: its value is a string with the format &amp;quot;vendor_id:product_id&amp;quot;. Both vendor_id and product_id corresponds to the PCI device's vendor_id and product_id&lt;br /&gt;
** pci_slot: its value is a string with the format &amp;quot;domain:bus:slot.func&amp;quot; that correspond's to the PCI device's slot as named on a linux system.&lt;br /&gt;
*The binding:vif_details will have keys depending on the neutron port's vif type&lt;br /&gt;
** profileid: this key will be used to support the vif type VIF_TYPE_802_1QBH&lt;br /&gt;
** vlan_id: this key will be used to support the vif type VIF_TYPE_HW_VEB [irenab - neutron uses 'segmentation_id'. Let's pass it in the binding:vif_details]&lt;br /&gt;
* interface config and resulting interface XML will be generated based on both vnic_type and vif_type. The vnic_type, if not present as a key in the top level port dictionary, defaults to 'virtio'&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 28th, 2014===&lt;br /&gt;
[[nova-neutron-sriov]]&lt;br /&gt;
* Openstack Icehouse schedule: https://wiki.openstack.org/wiki/Icehouse_Release_Schedule&lt;br /&gt;
* Work Items for the initial release:&lt;br /&gt;
** Nova: generic PCI-passthrough [Nova folks to add details]&lt;br /&gt;
*** pci_information support, add tag/extra information to pci devices.&lt;br /&gt;
**** pci_information =  { { 'device_id': &amp;quot;8086&amp;quot;, 'vendor_id': &amp;quot;000[1-2]&amp;quot; }, { 'e.group' :'gpu' } } &lt;br /&gt;
*** pci flavor define attr can be used in the pci flavor and how pci stats report it's pool&lt;br /&gt;
**** pci_flavor_attrs = ['e.group']&lt;br /&gt;
*** pci schduler to support corresponding extra information.&lt;br /&gt;
** Nova: SRIOV&lt;br /&gt;
*** Dependencies on Nova Generic PCI-Passthrough&lt;br /&gt;
**** Support of PCI attribute sriov_group in the PCI passthrough device list&lt;br /&gt;
**** Support of PCI stats based on sriov_group&lt;br /&gt;
*** overal change breakdown&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** requested network and SRIOV request spec management &lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** SRIOV request spec--vif association&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding [irenab: vnic_type, pci slot record]&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface/network xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
** Neutron:&lt;br /&gt;
**** enhance neutron port-create to support vnic-type and port profile [ irenab: pci slot record]&lt;br /&gt;
**** to support the enhanced port binding and as a result API changes in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [Might not be needed]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 27th, 2014===&lt;br /&gt;
* Main focus is on SRIOV&lt;br /&gt;
* References:&lt;br /&gt;
**https://docs.google.com/document/d/1RfxfXBNB0mD_kH9SamwqPI8ZM-jg797ky_Fze7SakRc/edit?pli=1&lt;br /&gt;
**https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit?pli=1#&lt;br /&gt;
* Some ideas that came out of discussions &lt;br /&gt;
** Assuming there is an attribute (based on pci flavor terminology) for sriov, which name is yet to be determined. Call it sriov_group temporarily for reference in below&lt;br /&gt;
** Assuming PCI stats will be supported based on this attribute&lt;br /&gt;
** Assuming for each physical network that's supported in the cloud, there is a corresponding sriov_group. To make it simple, say if there are two physical networks: physnet1 and physnet2, then there are two sriov_groups named physnet1 and physnet2&lt;br /&gt;
** sriov devices in the pci passthrough device list (the pci whitelist) will be tagged by &amp;quot;sriov_group: physnet1&amp;quot; or &amp;quot;sriov_group: physnet2&amp;quot; based on which physical network the device belongs to.&lt;br /&gt;
** Initially, we don't have to change nova CLI/API. Instead, the neutron port-create will be enhanced to support the following new arguments:&lt;br /&gt;
*** --vnic-type = “vnic” | “direct” | “macvtap”. OPTIONAL with default as &amp;quot;vnic&amp;quot;. The actually names of the three possible vnic types for further discussion&lt;br /&gt;
*** port-profile=port-profile-name for support of IEEE802.1BR. OPTIONAL.&lt;br /&gt;
*** pci-flavor=pci-flavor-name. Support of this argument is debatable. If sriov devices can be used outside of the physical network, or it's desirable to further partition a physical network, it might be necessary to introduce this argument. In that case, pci flavors need to be explicitly created once it's available. This argument may not be needed initially.&lt;br /&gt;
** to create a VM with sriov NICs&lt;br /&gt;
*** Configuration on the controller node: pci attribute sriov_group&lt;br /&gt;
*** configurations on a compute node: physical networks as required by the neutron plugin, pci passthrough device list that are properly tagged with sriov_group.&lt;br /&gt;
*** neutron net-create that may be provided with the provider network name, or otherwise uses default physical network name as configured in the neutron plugin&lt;br /&gt;
*** neutron port-create --vnic-type direct &amp;lt;net-uuid&amp;gt;&lt;br /&gt;
*** nova boot --flavor m1.large --image &amp;lt;image-uuid&amp;gt; --nic port-id=&amp;lt;port-uuid-from-port-create&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Possible Work Items&lt;br /&gt;
** Existing BPs that are relevant based on the above&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
*** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
** The above BPs may be redefined or new BPs can be created based on the actual work items.&lt;br /&gt;
** Roughly speaking, there are the following work items&lt;br /&gt;
*** nova side: a proof of concept patch is captured in here: https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?pli=1 and https://review.openstack.org/67500&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** although no changes to --nic options for now, the semantics of the port-id parameter is enhanced to support sriov. Basically, if it's a sriov port, request_specs for scheduling should be created and managed. &lt;br /&gt;
***** how do we address this requirement that a compute node may support SRIOV port only, a new filter or enhancement to the existing pci passthrough filter? [irenab - May use host aggregate ]&lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** Nova compute manager to associate a requested network with a request spec, thus corresponds a requested network with a PCI device that is allocated for it&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
*** neutron side:&lt;br /&gt;
**** to support the enhanced port binding in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [irenab - if we use binding:profile, there should be no changes to existing support]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 15th, 2014===&lt;br /&gt;
* Ian's proposal for flavor and backend tagging: https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit#&lt;br /&gt;
* Review this against known use cases&lt;br /&gt;
* Document any use cases not in that document&lt;br /&gt;
=== Agenda on Jan. 14th 2014===&lt;br /&gt;
* PCI group versus PCI flavor: let's sort out what exactly they are, APIs around them, and pros and cons of each. &lt;br /&gt;
* Please check [https://wiki.openstack.org/wiki/Meetings/Passthrough#POC_Implementation]&lt;br /&gt;
* Division of works&lt;br /&gt;
&lt;br /&gt;
=== POC Implementation ===&lt;br /&gt;
See [https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?usp=sharing POC implementation] &lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
A specific PCI attachment (could by a virtual function) is described by:&lt;br /&gt;
* vendor_id&lt;br /&gt;
* product_id&lt;br /&gt;
* address&lt;br /&gt;
&lt;br /&gt;
There is a whitelist (at the moment):&lt;br /&gt;
* which devices on a specific hypervisor host can be exposed&lt;br /&gt;
&lt;br /&gt;
There is an alias (at the moment):&lt;br /&gt;
* groupings of PCI devices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The user view of system ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough, we need things like:&lt;br /&gt;
* user request a &amp;quot;large&amp;quot; GPU&lt;br /&gt;
* could be from various vendors or product versions&lt;br /&gt;
&lt;br /&gt;
For network, we need things like:&lt;br /&gt;
* user requests a nic for a specific neutron network&lt;br /&gt;
* they want to say if it's virtual (the default type) or passthrough (super fast, slow, etc)&lt;br /&gt;
* this includes groups by address (virtual function, etc) so it's specific to a particular _group_ of neutron network, each with specific configurations (e.g. VLAN id, a NIC attached to a specific provider network)&lt;br /&gt;
* or it involves a NIC that can be programmatically made to attach to a specific neutron network&lt;br /&gt;
&lt;br /&gt;
==== The user view of requesting things ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough:&lt;br /&gt;
* user requests a flavor extra specs *imply* which possible PCI devices can be connected&lt;br /&gt;
* nova boot --image some_image --flavor flavor_that_has_big_GPU_attached some_name&lt;br /&gt;
&lt;br /&gt;
The admin would expose a flavor that gives you, for example, one large GPU and one small GPU:&lt;br /&gt;
* nova flavor-key  m1.large set  &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot; large_GPU:1,small_GPU:1&amp;quot;&lt;br /&gt;
* TODO - this may change in the future&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For SRIOV:&lt;br /&gt;
* in the most basic case, the user may be given direct access to a network card, just like we do with GPU, but this is less useful than...&lt;br /&gt;
* user requests neutron nics, on specific neutron networks, but connected in a specific way (i.e. high speed SRIOV vs virtual)&lt;br /&gt;
* note that some of the nics may be virtual, some may be passthrough, and some might be a different type of passthrough&lt;br /&gt;
* nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id&amp;gt;,nic-type=&amp;lt;slow | fast | foobar&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* (where slow is a virtual connection, fast is a PCI passthrough, and foobar is some other type of PCI passthrough)&lt;br /&gt;
* consider several nics, of different types: nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id-1&amp;gt; --nic net-id=&amp;lt;net-id-2&amp;gt;,nic-type=fast --nic net-id=&amp;lt;net-id-3&amp;gt;,nic-type=faster  &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* when hot-plugging hot-unplugging, we also need to specify vnic-type in a similar way&lt;br /&gt;
* also, this should work nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic port-id=&amp;lt;port-id&amp;gt;, given&lt;br /&gt;
* quantum port-create --fixed-ip subnet_id=&amp;lt;subnet-id&amp;gt;,ip_address=192.168.57.101 &amp;lt;net-id&amp;gt; --nic-type=&amp;lt;slow | fast | foobar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: need agreement, but one idea for admin...&lt;br /&gt;
* pci_alias_1='{&amp;quot;name&amp;quot;:&amp;quot;Cisco.VIC&amp;quot;, devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;, &amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;fast&amp;quot;}'&lt;br /&gt;
* pci_alias_2='{&amp;quot;name&amp;quot;:&amp;quot;Fast&amp;quot;,devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;direct&amp;quot;}, {&amp;quot;vendor_id&amp;quot;:&amp;quot;123&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0081&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;faster&amp;quot;, }'&lt;br /&gt;
&lt;br /&gt;
==== New Proposal for admin view ====&lt;br /&gt;
&lt;br /&gt;
Whitelist:&lt;br /&gt;
* only certain devices exposed to Nova&lt;br /&gt;
* just a list of addresses that are allowed (including wildcards)&lt;br /&gt;
* by default, nothing is allowed&lt;br /&gt;
* this is assumed to be (mostly) static for the lifetime of the machine&lt;br /&gt;
* contained in nova.conf&lt;br /&gt;
&lt;br /&gt;
PCI flavors:&lt;br /&gt;
* specify groups of PCI devices, to be used in Neutron port descriptions or Server flavor extra specs&lt;br /&gt;
* configured using host aggregates API:&lt;br /&gt;
** a combination of whitelist, alias and group&lt;br /&gt;
** raw device passthrough (grouped by device_id and product_id)&lt;br /&gt;
** network device passthrough (grouped by device address also)&lt;br /&gt;
** note: there might be several options for each (GPU v3 and GPU v4 in a single flavor)&lt;br /&gt;
* only servers in the aggregate will be considered by the scheduler for each PCI flavor&lt;br /&gt;
* these are shared across the whole child cell (or if no cells, whole nova deploy)&lt;br /&gt;
&lt;br /&gt;
Scheduler updates:&lt;br /&gt;
* on periodic update, report current status of devices&lt;br /&gt;
* if any devices are in the whitelist, look up host aggregates to check what device types to report&lt;br /&gt;
* report the number of free devices per PCI flavor&lt;br /&gt;
* device usage tracked by resource manager as normal, looking at all devices in whitelist&lt;br /&gt;
&lt;br /&gt;
On attach of PCI device:&lt;br /&gt;
* scheduler picks host it things has a free device&lt;br /&gt;
* check with resource manage in usual way&lt;br /&gt;
* assign device to VM&lt;br /&gt;
* ignoring migration for now&lt;br /&gt;
&lt;br /&gt;
On attach of VIF device (through boot or otherwise):&lt;br /&gt;
* TBD... very sketchy plan...&lt;br /&gt;
* ideally neutron port contains associated PCI flavor/alias, or its assumed to be a virtual port&lt;br /&gt;
* neutron supplies the usual information, VLAN-id, etc&lt;br /&gt;
* neutron and nova negotiate which VIF driver to use, in usual way, given extra info about nic-type from PCI alias settings, etc&lt;br /&gt;
* VIF driver given a hypervisor agnostic lib to attach the PCI device, extracted from Nova attach PCI device code&lt;br /&gt;
* VIF driver is free to configure the specific PCI device before attaching it using the callback into the Nova driver (or modify Nova code to extend the create API)&lt;br /&gt;
&lt;br /&gt;
=== Agenda on Jan. 8th, 2014 ===&lt;br /&gt;
&lt;br /&gt;
:Let's go over the key concepts and use cases. In the use cases, neutron or neutron plugin specific configurations are not mentioned.&lt;br /&gt;
&lt;br /&gt;
==== Key Concepts ====&lt;br /&gt;
'''Note that paragraphs with ''Itablic'' text were added by Iawells as comments.'''&lt;br /&gt;
* PCI Groups&lt;br /&gt;
:# A PCI group is a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud.&lt;br /&gt;
&lt;br /&gt;
''In fact, two proposals exist for PCI group definition - via API, with the implication that they're stored centrally in the database, and via config, specifically a (match expression -&amp;gt; PCI group name) in the compute node configuration.  A competing proposal is PCI aliases, which work on the current assumption that all PCI device data is returned to the database and PCI devices can be selected by doing matching at schedule time and thus a name -&amp;gt; match expression mapping is all that need be saved.  Thus the internal question of &amp;quot;should all device information be returned to the controller&amp;quot; drives some of the design options.'' &lt;br /&gt;
&lt;br /&gt;
:# it's worth mentioning that using an API to define PCI groups make them owned by the tenant who creates them.&lt;br /&gt;
&lt;br /&gt;
* Pre-defined PCI Groups&lt;br /&gt;
:For each PCI device class that openstack supports, a PCI group is defined and associated with the PCI devices belonging to that device class. For example, for the PCI device class ''net'', there is a predefined PCI group named ''net''&lt;br /&gt;
&lt;br /&gt;
* User-defined PCI Groups&lt;br /&gt;
:User can define PCI groups using a Nova API.&lt;br /&gt;
&lt;br /&gt;
* PCI Passthrough List (whitelist)&lt;br /&gt;
:# Specified on a compute node to define all the PCI passthrough devices and their associated PCI groups that are available on the node.&lt;br /&gt;
:# blacklist (exclude list) may be added later if deemed necessary.&lt;br /&gt;
&lt;br /&gt;
* vnic_type: &lt;br /&gt;
:# virtio: a virtual port that is attached to a virtual switch&lt;br /&gt;
:# direct: SRIOV without macvtap&lt;br /&gt;
:# macvtap: SRIOV with macvtap&lt;br /&gt;
''This configuration item is not essential to PCI passthrough.  It's also a Neutron configuration item.''&lt;br /&gt;
&lt;br /&gt;
* nova boot: new parameters in --nic option&lt;br /&gt;
:# vnic-type=“vnic” | “direct” | “macvtap”&lt;br /&gt;
:# pci-group=pci-group-name&lt;br /&gt;
:# port-profile=port-profile-name ''This property is not related directly to use of PCI passthrough for networks.  It is a requirement of 802.1BR-based systems.''&lt;br /&gt;
&lt;br /&gt;
* neutron port-create: new arguments&lt;br /&gt;
:# --vnic-type “vnic” | “direct” | “macvtap”&lt;br /&gt;
:# --pci-group pci-group-name&lt;br /&gt;
:# port-profile port-profile-name&lt;br /&gt;
&lt;br /&gt;
* Nova SRIOV Configuration&lt;br /&gt;
:# vnic_type = &amp;lt;vnic-type&amp;gt;: specified in controller node to indicate the default vnic-type that VMs will be booted with. default value is &amp;quot;vnic&amp;quot;&lt;br /&gt;
:# sriov_auto_all = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that all sriov capable ports are added into the ‘net’ PCI group.&lt;br /&gt;
:# sriov_only = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that nova can only place VMs with sriov vnics onto these nodes. Default value is on for nodes with SRIOV ports. &lt;br /&gt;
:# sriov_pci_group = &amp;lt;pci-group-name&amp;gt;: specified in compute nodes in which all of its SRIOV ports belong to a single pci group.&lt;br /&gt;
''The SRIOV cofiguration items are enhancements to the base proposal that make it much easier to configure compute hosts where it is known that all VFs will be available to cloud users.''&lt;br /&gt;
&lt;br /&gt;
==== Use Cases ====&lt;br /&gt;
''These use cases do not include non-network passthrough cases.''&lt;br /&gt;
* SRIOV based cloud&lt;br /&gt;
:# All the compute nodes are identical and all the NICs are SRIOV based&lt;br /&gt;
:# All the NICs are connected to the same physical network&lt;br /&gt;
&lt;br /&gt;
:In this cloud, the admin only needs to specify vnic_type=direct on the controller and sriov_auto_all=on on the compute nodes in the nova configuration file. In addition, the new arguments introduced in the nova boot command are not required.&lt;br /&gt;
&lt;br /&gt;
* A cloud with mixed Vnics&lt;br /&gt;
:# On compute nodes with sriov ports only, set sriov_auto_all = on&lt;br /&gt;
:# On compute nodes without sriov ports, no change is required&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov vnic, the nova boot command would look like:&lt;br /&gt;
&lt;br /&gt;
    nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt;&lt;br /&gt;
                           --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=direct &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This will require some minimum change in the existing applications.&lt;br /&gt;
&lt;br /&gt;
* A Cloud that requires multiple SRIOV PCI groups&lt;br /&gt;
:# create all the pci-groups in the cloud by invoking a Nova API&lt;br /&gt;
:# on compute nodes that support a single pci group and in which all of the SRIOV ports belong to this group, set sriov_auto_all=on, sriov_pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# on compute nodes that support multiple pci groups, define the pci-passthrough-list&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov macvtap, the nova boot command would look like:&lt;br /&gt;
     nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; &lt;br /&gt;
                    --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=macvtap,pci-group=&amp;lt;group-name&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introducing new compute nodes with SRIOV into an existing cloud&lt;br /&gt;
:Depending on the cloud and the compute node being introduced:&lt;br /&gt;
:# it could be as simple as adding sriov_auto_all=on into the nova config file&lt;br /&gt;
:# it could be setting sriov_auto_all=on and pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# it could be defining the pci-passthrough-list.&lt;br /&gt;
&lt;br /&gt;
* NIC hot plug&lt;br /&gt;
&lt;br /&gt;
=== Evolving Design Doc ===&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Ian typed up a complete proposal in two sections in that document, which is pulled out here: https://docs.google.com/document/d/1svN89UXKbFoka0EF6MFUP6OwdNvhY4OkdjEZN-rD-0Q/edit#  - this proposal takes the 'PCI groups via compute node config' approach and makes no attempt at proposing APIs.&lt;br /&gt;
&lt;br /&gt;
=== Previous Meetings ===&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough_meeting/2013/pci_passthrough_meeting.2013-12-24-14.02.log.html&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough/&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on Dec. 17th, 2013'''&lt;br /&gt;
[[Meetings/Passthrough/dec-17th-2013.log]]&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on June. 17th, 2014'''&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/passthrough/2014/passthrough.2014-06-17-13.07.log.html&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56591</id>
		<title>Meetings/Passthrough</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Passthrough&amp;diff=56591"/>
				<updated>2014-06-24T10:39:01Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Agenda on May 26th, 2014 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next meeting will be on Wed May 7th at 1300 UTC on #openstack-meeting-alt&lt;br /&gt;
&lt;br /&gt;
=== Agenda on May 26th, 2014 ===&lt;br /&gt;
* Nova SR-IOV networking&lt;br /&gt;
** [https://review.openstack.org/#/c/86606/ nova spec review]&lt;br /&gt;
** patch submission soon&lt;br /&gt;
** tempest tests&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://review.openstack.org/#/c/82206/ Init PCI manager after compute node initialization]&lt;br /&gt;
** [https://review.openstack.org/#/c/81954/ makes sure correct PCI device allocation]&lt;br /&gt;
* Other works/features&lt;br /&gt;
** Live migration&lt;br /&gt;
** Attach SR-IOV port to an existing instance&lt;br /&gt;
** possibly changing the names of existing vnic-types&lt;br /&gt;
** associate a default vnic-type with a neutron network&lt;br /&gt;
** admin controlled knobs&lt;br /&gt;
** HA &lt;br /&gt;
** others&lt;br /&gt;
&lt;br /&gt;
Irenab: Sorry, I'll miss this one.&lt;br /&gt;
&lt;br /&gt;
=== Agenda on March 25th, 2014 ===&lt;br /&gt;
* PCI SR-IOV Networking use case&lt;br /&gt;
Refer to https://docs.google.com/document/d/1zgMaXqrCnad01-jQH7Mkmf6amlghw9RMScGLBrKslmw/edit&lt;br /&gt;
&lt;br /&gt;
=== Recap of Discussions ===&lt;br /&gt;
==== Current PCI Passthrough ====&lt;br /&gt;
&lt;br /&gt;
* How to Use Wiki: https://wiki.openstack.org/wiki/Pci_passthrough&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: defines all the PCI passthrough devices that are available on a compute node. It's currently based on &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt;&lt;br /&gt;
* PCI stats group: defines the keys based on which a PCI device is accounted. It's currently based on the keys: &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;extra_info or simply PCI address of a physical function&amp;gt;. &lt;br /&gt;
* PCI Alias: specifies a list of PCI device requirements. A PCI requirement specifies a dictionary with keys: &amp;lt;alias name&amp;gt; &amp;lt;vendor_id&amp;gt; &amp;lt;product_id&amp;gt; &amp;lt;device_type&amp;gt;. Multiple requirements can be specified per PCI Alias with the same &amp;lt;device_type&amp;gt; (which may not work yet due to bugs). &amp;lt;alias name&amp;gt; is required. Others are optional.&lt;br /&gt;
* Nova Server Flavor: PCI requirements can be added into a nova flavor as it's extra-spec in the syntax &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot;&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;{,&amp;lt;PCI Alias Name&amp;gt;:&amp;lt;count&amp;gt;}&amp;quot; &lt;br /&gt;
* PCI Passthrough filter for nova scheduler: this filter works based on the PCI stats group and PCI aliases referenced in the nova flavor. If mutliple aliases exist in the flavor, all of the them have to be satified. If multiple PCI requirements exist in one PCI alias, only one of the requirements defined in the alias needs to be satisfied. Suppose a PCI requirement is represented as R, and a PCI alias as (R1 OR R2 OR ...):count. Further assuming two PCI aliases, with the first one having two PCI requirements, with the second having one PCI requirement. Logically speaking, in order to choose a host as candidate, it must satisfy &lt;br /&gt;
        (R11 OR R12):count AND R21:count&lt;br /&gt;
&lt;br /&gt;
Given a PCI requirement, it's used to match against PCI stats groups until one or multiple matches are found to satisfy the count. Note that matching is based on the keys existing in the PCI requirement. Therefore it's possible for a PCI requirement to be matching multiple PCI stats groups.  &lt;br /&gt;
&lt;br /&gt;
==== Motivation for enhancement ====&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work if a compute node has multiple vNICs from the same vendor that are not used in the same way.&lt;br /&gt;
* PCI requirement only uses &amp;lt;vendor_id&amp;gt; and &amp;lt;product_id&amp;gt;. This doesn't work when the vNIC ports are connected to different physical networks . In other words, PCI devices from the same vendor may not be treated equally when it comes to choose vNIC ports for a VM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== What we have discussed so far to satisfy the above requirements ====&lt;br /&gt;
&lt;br /&gt;
===== PCI Group =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit#heading=h.30de7p6sgoxp. The doc becomes messy and almost unreadable. But refer to https://wiki.openstack.org/wiki/Meetings/Passthrough#Agenda_on_Jan._8th.2C_2014 for the main ideas behind it.&lt;br /&gt;
* PCI Group: a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud&lt;br /&gt;
* PCI whitelist: each entry is defined as a tuple of &amp;lt;device-filter, pci-group-name&amp;gt;. The device-filter uses vendor_id, product_id and PCI addresses to specify a collection of PCI devices. &lt;br /&gt;
* PCI stats group: each PCI group is a PCI stats group&lt;br /&gt;
* PCI Alias: alias is no longer needed&lt;br /&gt;
* Nova Server Flavor: Use G to represent a PCI group. An exampel of PCI requirements can be specified as:&lt;br /&gt;
                  (G1 OR G2):count AND G3:count&lt;br /&gt;
It defines that the VM needs &amp;quot;count&amp;quot; of PCI devices that are either from G1 or G2, and 'count&amp;quot; of PCI devices from G3.&lt;br /&gt;
&lt;br /&gt;
It supports only one well-defined tag called PCI group, which is considered too limited by some of the folks. &lt;br /&gt;
It simplifies the existing implementation without losing any of its capabilities (or use cases the current implementation can support).&lt;br /&gt;
&lt;br /&gt;
===== PCI Flavor =====&lt;br /&gt;
&lt;br /&gt;
* Refer to https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit&lt;br /&gt;
&lt;br /&gt;
* PCI whitelist: it's called PCI information in the above wiki&lt;br /&gt;
* PCI stats group: not clearly defined&lt;br /&gt;
* PCI flavor Attributes: refer to the wiki&lt;br /&gt;
* PCI flavor API: refer to the wiki&lt;br /&gt;
&lt;br /&gt;
This can be considered a generalized version of PCI Group as it supports arbitrary number of arbitrary tags. But system behaviors (PCI stats groups and scheduling, for example) are not clearly specified. Use cases to justify it is yet to be established.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Host Aggregate =====&lt;br /&gt;
&lt;br /&gt;
It was brought up during the discussion that the existing host aggregate may be used to support the new requirement. A couple of issues with host aggregate were discussed:&lt;br /&gt;
* it doesn't support dynamic host join to a host aggregate&lt;br /&gt;
* scheduling with host aggregate is not stats based.&lt;br /&gt;
&lt;br /&gt;
===== Nic Type/Flavor =====&lt;br /&gt;
Refer to http://lists.openstack.org/pipermail/openstack-dev/2014-January/023981.html and http://lists.openstack.org/pipermail/openstack-dev/2013-December/022737.html&lt;br /&gt;
&lt;br /&gt;
===== A compromised implementation =====&lt;br /&gt;
to speed up the development and facilitate integration testing with neutron.&lt;br /&gt;
Refer to https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov. Also refer to the submitted patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BPs &amp;amp; Patches ===&lt;br /&gt;
==== Neutron Side ====&lt;br /&gt;
* RKukura (binding:vif_details and binding:profile)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/vif-details&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-binding-profile&lt;br /&gt;
* Sadasu (Cisco MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-ucs-manager-mechanism-driver&lt;br /&gt;
* Irenab (vnic_type and mlnx MD)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-sriov-nic-switch&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/mlnx-ml2-support&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
* Baoli (for anything else that's needed for SRIOV in neutron)&lt;br /&gt;
** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
&lt;br /&gt;
==== Nova Side ====&lt;br /&gt;
* Baoli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
* Yongli&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info&lt;br /&gt;
* Yunhong&lt;br /&gt;
** https://blueprints.launchpad.net/nova/+spec/pci-extra-info-icehouse&lt;br /&gt;
&lt;br /&gt;
==== Itzik's patch to add physical network in VIF ====&lt;br /&gt;
https://review.openstack.org/#/c/59093/&lt;br /&gt;
&lt;br /&gt;
===Agenda on Feb. 13th, 2014===&lt;br /&gt;
* Discuss the Neutron SR-IOV's requirements on the nova generic PCI support, and their availability&lt;br /&gt;
** in the PCI information definition:&lt;br /&gt;
*** the pci device filter expression (I don't see it's given a name in https://wiki.openstack.org/wiki/PCI_passthrough_SRIOV_support_Icehouse) should support (which may be done as an enhancement).&lt;br /&gt;
**** specifying a physical function in the form of domain:bus:slot.func&lt;br /&gt;
**** specifying a physical function in the form of a ethernet interface name. &lt;br /&gt;
*** tagging with an attribute called &amp;quot;net-group&amp;quot; or simply &amp;quot;physical_network&amp;quot;. The tag name &amp;quot;phyical_network&amp;quot; now may make more sense based on the consensus reached on Feb. 12th.&lt;br /&gt;
** PCI stats based on the tag &amp;quot;physical_network&amp;quot;&lt;br /&gt;
** An API to retrieve a tag's value on a per PCI device basis, something like: get_pci_device_tag_value(pci_dev, tag_name)&lt;br /&gt;
** An API to create a PCI request for scheduling purpose&lt;br /&gt;
** An API to retrieve a PCI device that is linked to the original PCI request. &lt;br /&gt;
** The existing pci_manager.get_instance_pci_devs(instance) shouldn't return PCI devices that are allocated as a result of the aforementioned PCI requests.&lt;br /&gt;
&lt;br /&gt;
===Feb. 12th, 2014 Recap===&lt;br /&gt;
Consensus reached during this meeting:&lt;br /&gt;
* The binding:profile dictionary will now have these keys defined: 'physical_network', 'pci_vendor_info', 'pci_slot'.&lt;br /&gt;
** physical_network: its value is the physical network name that has been chosen for the nic (neutron port) to attach to. ML2 MD will use this information:&lt;br /&gt;
*** In the non-SR-IOV case with the agent-based MDs, the ML2 plugin's port binding code iterates over the registered MDs to try to bind, calling bind_port() on each. Within the AgentMechanismDriverBase.bind_port() implementation, it iterates over the network segments, calling check_segment_for_agent() on the derived class for each segment. The 1st segment that is tried for which the agent on the node identified by binding:host_id has a mapping for the segment's physical_network is used. &lt;br /&gt;
*** in the non-SR_IOV case, need to add a line of code in the existing agent-based MDs check_segment_for_agent() to make sure vnic_type == 'virtio', so it won't bind when SR-IOV is required. Irenab's vnic BP will take care of this.&lt;br /&gt;
*** in the SR-IOV case, the physical network names that a neutron port can potentially attach to will be used for scheduling, and the change to the scheduling filter in the case of multiprovidernet extension is TBD. &lt;br /&gt;
*** in the SR-IOV case, SR-IOV MDs will need to iterate over the segments looking for the 1st one that has network_type of 'vlan' and that has the physical_network specified in binding:profile:physical_network; the SR-IOV MDs can include the segment's segmentation_id within the binding:vif_details so that VIF driver can put that into the libvirt XML&lt;br /&gt;
** pci_vendor_info: its value is a string with the format &amp;quot;vendor_id:product_id&amp;quot;. Both vendor_id and product_id corresponds to the PCI device's vendor_id and product_id&lt;br /&gt;
** pci_slot: its value is a string with the format &amp;quot;domain:bus:slot.func&amp;quot; that correspond's to the PCI device's slot as named on a linux system.&lt;br /&gt;
*The binding:vif_details will have keys depending on the neutron port's vif type&lt;br /&gt;
** profileid: this key will be used to support the vif type VIF_TYPE_802_1QBH&lt;br /&gt;
** vlan_id: this key will be used to support the vif type VIF_TYPE_HW_VEB [irenab - neutron uses 'segmentation_id'. Let's pass it in the binding:vif_details]&lt;br /&gt;
* interface config and resulting interface XML will be generated based on both vnic_type and vif_type. The vnic_type, if not present as a key in the top level port dictionary, defaults to 'virtio'&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 28th, 2014===&lt;br /&gt;
[[nova-neutron-sriov]]&lt;br /&gt;
* Openstack Icehouse schedule: https://wiki.openstack.org/wiki/Icehouse_Release_Schedule&lt;br /&gt;
* Work Items for the initial release:&lt;br /&gt;
** Nova: generic PCI-passthrough [Nova folks to add details]&lt;br /&gt;
*** pci_information support, add tag/extra information to pci devices.&lt;br /&gt;
**** pci_information =  { { 'device_id': &amp;quot;8086&amp;quot;, 'vendor_id': &amp;quot;000[1-2]&amp;quot; }, { 'e.group' :'gpu' } } &lt;br /&gt;
*** pci flavor define attr can be used in the pci flavor and how pci stats report it's pool&lt;br /&gt;
**** pci_flavor_attrs = ['e.group']&lt;br /&gt;
*** pci schduler to support corresponding extra information.&lt;br /&gt;
** Nova: SRIOV&lt;br /&gt;
*** Dependencies on Nova Generic PCI-Passthrough&lt;br /&gt;
**** Support of PCI attribute sriov_group in the PCI passthrough device list&lt;br /&gt;
**** Support of PCI stats based on sriov_group&lt;br /&gt;
*** overal change breakdown&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** requested network and SRIOV request spec management &lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** SRIOV request spec--vif association&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding [irenab: vnic_type, pci slot record]&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface/network xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
** Neutron:&lt;br /&gt;
**** enhance neutron port-create to support vnic-type and port profile [ irenab: pci slot record]&lt;br /&gt;
**** to support the enhanced port binding and as a result API changes in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [Might not be needed]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 27th, 2014===&lt;br /&gt;
* Main focus is on SRIOV&lt;br /&gt;
* References:&lt;br /&gt;
**https://docs.google.com/document/d/1RfxfXBNB0mD_kH9SamwqPI8ZM-jg797ky_Fze7SakRc/edit?pli=1&lt;br /&gt;
**https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit?pli=1#&lt;br /&gt;
* Some ideas that came out of discussions &lt;br /&gt;
** Assuming there is an attribute (based on pci flavor terminology) for sriov, which name is yet to be determined. Call it sriov_group temporarily for reference in below&lt;br /&gt;
** Assuming PCI stats will be supported based on this attribute&lt;br /&gt;
** Assuming for each physical network that's supported in the cloud, there is a corresponding sriov_group. To make it simple, say if there are two physical networks: physnet1 and physnet2, then there are two sriov_groups named physnet1 and physnet2&lt;br /&gt;
** sriov devices in the pci passthrough device list (the pci whitelist) will be tagged by &amp;quot;sriov_group: physnet1&amp;quot; or &amp;quot;sriov_group: physnet2&amp;quot; based on which physical network the device belongs to.&lt;br /&gt;
** Initially, we don't have to change nova CLI/API. Instead, the neutron port-create will be enhanced to support the following new arguments:&lt;br /&gt;
*** --vnic-type = “vnic” | “direct” | “macvtap”. OPTIONAL with default as &amp;quot;vnic&amp;quot;. The actually names of the three possible vnic types for further discussion&lt;br /&gt;
*** port-profile=port-profile-name for support of IEEE802.1BR. OPTIONAL.&lt;br /&gt;
*** pci-flavor=pci-flavor-name. Support of this argument is debatable. If sriov devices can be used outside of the physical network, or it's desirable to further partition a physical network, it might be necessary to introduce this argument. In that case, pci flavors need to be explicitly created once it's available. This argument may not be needed initially.&lt;br /&gt;
** to create a VM with sriov NICs&lt;br /&gt;
*** Configuration on the controller node: pci attribute sriov_group&lt;br /&gt;
*** configurations on a compute node: physical networks as required by the neutron plugin, pci passthrough device list that are properly tagged with sriov_group.&lt;br /&gt;
*** neutron net-create that may be provided with the provider network name, or otherwise uses default physical network name as configured in the neutron plugin&lt;br /&gt;
*** neutron port-create --vnic-type direct &amp;lt;net-uuid&amp;gt;&lt;br /&gt;
*** nova boot --flavor m1.large --image &amp;lt;image-uuid&amp;gt; --nic port-id=&amp;lt;port-uuid-from-port-create&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Possible Work Items&lt;br /&gt;
** Existing BPs that are relevant based on the above&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/ml2-request-vnic-type&lt;br /&gt;
*** https://blueprints.launchpad.net/neutron/+spec/pci-passthrough-sriov&lt;br /&gt;
*** https://blueprints.launchpad.net/nova/+spec/pci-passthrough-sriov&lt;br /&gt;
** The above BPs may be redefined or new BPs can be created based on the actual work items.&lt;br /&gt;
** Roughly speaking, there are the following work items&lt;br /&gt;
*** nova side: a proof of concept patch is captured in here: https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?pli=1 and https://review.openstack.org/67500&lt;br /&gt;
**** Nova server and scheduler changes:&lt;br /&gt;
***** although no changes to --nic options for now, the semantics of the port-id parameter is enhanced to support sriov. Basically, if it's a sriov port, request_specs for scheduling should be created and managed. &lt;br /&gt;
***** how do we address this requirement that a compute node may support SRIOV port only, a new filter or enhancement to the existing pci passthrough filter? [irenab - May use host aggregate ]&lt;br /&gt;
**** Nova compute&lt;br /&gt;
***** Nova compute manager to associate a requested network with a request spec, thus corresponds a requested network with a PCI device that is allocated for it&lt;br /&gt;
***** neutronv2 API in nova that supports interaction with neutron. Particularly speaking:&lt;br /&gt;
****** to support the enhanced port binding&lt;br /&gt;
****** to support an enhanced vif dictionary (e.g., vlan id is missing from the dictionary)&lt;br /&gt;
***** libvirt driver to support sriov&lt;br /&gt;
***** vif driver to support sriov, especially to generate config for sriov device and to generate interface xml&lt;br /&gt;
***** to support live migration assuming per interface network xml&lt;br /&gt;
*** neutron side:&lt;br /&gt;
**** to support the enhanced port binding in the main plugin&lt;br /&gt;
**** to enhance the neutron client in support of the enhanced interaction between nova and neutron [irenab - if we use binding:profile, there should be no changes to existing support]&lt;br /&gt;
**** to enhance various plugins, especially ml2 plugin to support the enhanced port binding (particularly vnic-type)&lt;br /&gt;
&lt;br /&gt;
===Agenda on Jan 15th, 2014===&lt;br /&gt;
* Ian's proposal for flavor and backend tagging: https://docs.google.com/document/d/1vadqmurlnlvZ5bv3BlUbFeXRS_wh-dsgi5plSjimWjU/edit#&lt;br /&gt;
* Review this against known use cases&lt;br /&gt;
* Document any use cases not in that document&lt;br /&gt;
=== Agenda on Jan. 14th 2014===&lt;br /&gt;
* PCI group versus PCI flavor: let's sort out what exactly they are, APIs around them, and pros and cons of each. &lt;br /&gt;
* Please check [https://wiki.openstack.org/wiki/Meetings/Passthrough#POC_Implementation]&lt;br /&gt;
* Division of works&lt;br /&gt;
&lt;br /&gt;
=== POC Implementation ===&lt;br /&gt;
See [https://docs.google.com/document/d/196pcKK0iQBJwQfCP0MRaXndjnO-RGfgW1zfeo1YcY4A/edit?usp=sharing POC implementation] &lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
A specific PCI attachment (could by a virtual function) is described by:&lt;br /&gt;
* vendor_id&lt;br /&gt;
* product_id&lt;br /&gt;
* address&lt;br /&gt;
&lt;br /&gt;
There is a whitelist (at the moment):&lt;br /&gt;
* which devices on a specific hypervisor host can be exposed&lt;br /&gt;
&lt;br /&gt;
There is an alias (at the moment):&lt;br /&gt;
* groupings of PCI devices&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The user view of system ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough, we need things like:&lt;br /&gt;
* user request a &amp;quot;large&amp;quot; GPU&lt;br /&gt;
* could be from various vendors or product versions&lt;br /&gt;
&lt;br /&gt;
For network, we need things like:&lt;br /&gt;
* user requests a nic for a specific neutron network&lt;br /&gt;
* they want to say if it's virtual (the default type) or passthrough (super fast, slow, etc)&lt;br /&gt;
* this includes groups by address (virtual function, etc) so it's specific to a particular _group_ of neutron network, each with specific configurations (e.g. VLAN id, a NIC attached to a specific provider network)&lt;br /&gt;
* or it involves a NIC that can be programmatically made to attach to a specific neutron network&lt;br /&gt;
&lt;br /&gt;
==== The user view of requesting things ====&lt;br /&gt;
&lt;br /&gt;
For GPU passthrough:&lt;br /&gt;
* user requests a flavor extra specs *imply* which possible PCI devices can be connected&lt;br /&gt;
* nova boot --image some_image --flavor flavor_that_has_big_GPU_attached some_name&lt;br /&gt;
&lt;br /&gt;
The admin would expose a flavor that gives you, for example, one large GPU and one small GPU:&lt;br /&gt;
* nova flavor-key  m1.large set  &amp;quot;pci_passthrough:alias&amp;quot;=&amp;quot; large_GPU:1,small_GPU:1&amp;quot;&lt;br /&gt;
* TODO - this may change in the future&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For SRIOV:&lt;br /&gt;
* in the most basic case, the user may be given direct access to a network card, just like we do with GPU, but this is less useful than...&lt;br /&gt;
* user requests neutron nics, on specific neutron networks, but connected in a specific way (i.e. high speed SRIOV vs virtual)&lt;br /&gt;
* note that some of the nics may be virtual, some may be passthrough, and some might be a different type of passthrough&lt;br /&gt;
* nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id&amp;gt;,nic-type=&amp;lt;slow | fast | foobar&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* (where slow is a virtual connection, fast is a PCI passthrough, and foobar is some other type of PCI passthrough)&lt;br /&gt;
* consider several nics, of different types: nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic net-id=&amp;lt;net-id-1&amp;gt; --nic net-id=&amp;lt;net-id-2&amp;gt;,nic-type=fast --nic net-id=&amp;lt;net-id-3&amp;gt;,nic-type=faster  &amp;lt;vm-name&amp;gt;&lt;br /&gt;
* when hot-plugging hot-unplugging, we also need to specify vnic-type in a similar way&lt;br /&gt;
* also, this should work nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; --nic port-id=&amp;lt;port-id&amp;gt;, given&lt;br /&gt;
* quantum port-create --fixed-ip subnet_id=&amp;lt;subnet-id&amp;gt;,ip_address=192.168.57.101 &amp;lt;net-id&amp;gt; --nic-type=&amp;lt;slow | fast | foobar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: need agreement, but one idea for admin...&lt;br /&gt;
* pci_alias_1='{&amp;quot;name&amp;quot;:&amp;quot;Cisco.VIC&amp;quot;, devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;, &amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;fast&amp;quot;}'&lt;br /&gt;
* pci_alias_2='{&amp;quot;name&amp;quot;:&amp;quot;Fast&amp;quot;,devices:[{&amp;quot;vendor_id&amp;quot;:&amp;quot;1137&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0071&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;direct&amp;quot;}, {&amp;quot;vendor_id&amp;quot;:&amp;quot;123&amp;quot;,&amp;quot;product_id&amp;quot;:&amp;quot;0081&amp;quot;, address:&amp;quot;*&amp;quot;,&amp;quot;attach-type&amp;quot;:&amp;quot;macvtap&amp;quot;}],&amp;quot;nic-type&amp;quot;:&amp;quot;faster&amp;quot;, }'&lt;br /&gt;
&lt;br /&gt;
==== New Proposal for admin view ====&lt;br /&gt;
&lt;br /&gt;
Whitelist:&lt;br /&gt;
* only certain devices exposed to Nova&lt;br /&gt;
* just a list of addresses that are allowed (including wildcards)&lt;br /&gt;
* by default, nothing is allowed&lt;br /&gt;
* this is assumed to be (mostly) static for the lifetime of the machine&lt;br /&gt;
* contained in nova.conf&lt;br /&gt;
&lt;br /&gt;
PCI flavors:&lt;br /&gt;
* specify groups of PCI devices, to be used in Neutron port descriptions or Server flavor extra specs&lt;br /&gt;
* configured using host aggregates API:&lt;br /&gt;
** a combination of whitelist, alias and group&lt;br /&gt;
** raw device passthrough (grouped by device_id and product_id)&lt;br /&gt;
** network device passthrough (grouped by device address also)&lt;br /&gt;
** note: there might be several options for each (GPU v3 and GPU v4 in a single flavor)&lt;br /&gt;
* only servers in the aggregate will be considered by the scheduler for each PCI flavor&lt;br /&gt;
* these are shared across the whole child cell (or if no cells, whole nova deploy)&lt;br /&gt;
&lt;br /&gt;
Scheduler updates:&lt;br /&gt;
* on periodic update, report current status of devices&lt;br /&gt;
* if any devices are in the whitelist, look up host aggregates to check what device types to report&lt;br /&gt;
* report the number of free devices per PCI flavor&lt;br /&gt;
* device usage tracked by resource manager as normal, looking at all devices in whitelist&lt;br /&gt;
&lt;br /&gt;
On attach of PCI device:&lt;br /&gt;
* scheduler picks host it things has a free device&lt;br /&gt;
* check with resource manage in usual way&lt;br /&gt;
* assign device to VM&lt;br /&gt;
* ignoring migration for now&lt;br /&gt;
&lt;br /&gt;
On attach of VIF device (through boot or otherwise):&lt;br /&gt;
* TBD... very sketchy plan...&lt;br /&gt;
* ideally neutron port contains associated PCI flavor/alias, or its assumed to be a virtual port&lt;br /&gt;
* neutron supplies the usual information, VLAN-id, etc&lt;br /&gt;
* neutron and nova negotiate which VIF driver to use, in usual way, given extra info about nic-type from PCI alias settings, etc&lt;br /&gt;
* VIF driver given a hypervisor agnostic lib to attach the PCI device, extracted from Nova attach PCI device code&lt;br /&gt;
* VIF driver is free to configure the specific PCI device before attaching it using the callback into the Nova driver (or modify Nova code to extend the create API)&lt;br /&gt;
&lt;br /&gt;
=== Agenda on Jan. 8th, 2014 ===&lt;br /&gt;
&lt;br /&gt;
:Let's go over the key concepts and use cases. In the use cases, neutron or neutron plugin specific configurations are not mentioned.&lt;br /&gt;
&lt;br /&gt;
==== Key Concepts ====&lt;br /&gt;
'''Note that paragraphs with ''Itablic'' text were added by Iawells as comments.'''&lt;br /&gt;
* PCI Groups&lt;br /&gt;
:# A PCI group is a collection of PCI devices that share the same functions or belong to the same subsystem in a cloud.&lt;br /&gt;
&lt;br /&gt;
''In fact, two proposals exist for PCI group definition - via API, with the implication that they're stored centrally in the database, and via config, specifically a (match expression -&amp;gt; PCI group name) in the compute node configuration.  A competing proposal is PCI aliases, which work on the current assumption that all PCI device data is returned to the database and PCI devices can be selected by doing matching at schedule time and thus a name -&amp;gt; match expression mapping is all that need be saved.  Thus the internal question of &amp;quot;should all device information be returned to the controller&amp;quot; drives some of the design options.'' &lt;br /&gt;
&lt;br /&gt;
:# it's worth mentioning that using an API to define PCI groups make them owned by the tenant who creates them.&lt;br /&gt;
&lt;br /&gt;
* Pre-defined PCI Groups&lt;br /&gt;
:For each PCI device class that openstack supports, a PCI group is defined and associated with the PCI devices belonging to that device class. For example, for the PCI device class ''net'', there is a predefined PCI group named ''net''&lt;br /&gt;
&lt;br /&gt;
* User-defined PCI Groups&lt;br /&gt;
:User can define PCI groups using a Nova API.&lt;br /&gt;
&lt;br /&gt;
* PCI Passthrough List (whitelist)&lt;br /&gt;
:# Specified on a compute node to define all the PCI passthrough devices and their associated PCI groups that are available on the node.&lt;br /&gt;
:# blacklist (exclude list) may be added later if deemed necessary.&lt;br /&gt;
&lt;br /&gt;
* vnic_type: &lt;br /&gt;
:# virtio: a virtual port that is attached to a virtual switch&lt;br /&gt;
:# direct: SRIOV without macvtap&lt;br /&gt;
:# macvtap: SRIOV with macvtap&lt;br /&gt;
''This configuration item is not essential to PCI passthrough.  It's also a Neutron configuration item.''&lt;br /&gt;
&lt;br /&gt;
* nova boot: new parameters in --nic option&lt;br /&gt;
:# vnic-type=“vnic” | “direct” | “macvtap”&lt;br /&gt;
:# pci-group=pci-group-name&lt;br /&gt;
:# port-profile=port-profile-name ''This property is not related directly to use of PCI passthrough for networks.  It is a requirement of 802.1BR-based systems.''&lt;br /&gt;
&lt;br /&gt;
* neutron port-create: new arguments&lt;br /&gt;
:# --vnic-type “vnic” | “direct” | “macvtap”&lt;br /&gt;
:# --pci-group pci-group-name&lt;br /&gt;
:# port-profile port-profile-name&lt;br /&gt;
&lt;br /&gt;
* Nova SRIOV Configuration&lt;br /&gt;
:# vnic_type = &amp;lt;vnic-type&amp;gt;: specified in controller node to indicate the default vnic-type that VMs will be booted with. default value is &amp;quot;vnic&amp;quot;&lt;br /&gt;
:# sriov_auto_all = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that all sriov capable ports are added into the ‘net’ PCI group.&lt;br /&gt;
:# sriov_only = &amp;lt;on | off&amp;gt;: specified in compute nodes to indicate that nova can only place VMs with sriov vnics onto these nodes. Default value is on for nodes with SRIOV ports. &lt;br /&gt;
:# sriov_pci_group = &amp;lt;pci-group-name&amp;gt;: specified in compute nodes in which all of its SRIOV ports belong to a single pci group.&lt;br /&gt;
''The SRIOV cofiguration items are enhancements to the base proposal that make it much easier to configure compute hosts where it is known that all VFs will be available to cloud users.''&lt;br /&gt;
&lt;br /&gt;
==== Use Cases ====&lt;br /&gt;
''These use cases do not include non-network passthrough cases.''&lt;br /&gt;
* SRIOV based cloud&lt;br /&gt;
:# All the compute nodes are identical and all the NICs are SRIOV based&lt;br /&gt;
:# All the NICs are connected to the same physical network&lt;br /&gt;
&lt;br /&gt;
:In this cloud, the admin only needs to specify vnic_type=direct on the controller and sriov_auto_all=on on the compute nodes in the nova configuration file. In addition, the new arguments introduced in the nova boot command are not required.&lt;br /&gt;
&lt;br /&gt;
* A cloud with mixed Vnics&lt;br /&gt;
:# On compute nodes with sriov ports only, set sriov_auto_all = on&lt;br /&gt;
:# On compute nodes without sriov ports, no change is required&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov vnic, the nova boot command would look like:&lt;br /&gt;
&lt;br /&gt;
    nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt;&lt;br /&gt;
                           --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=direct &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This will require some minimum change in the existing applications.&lt;br /&gt;
&lt;br /&gt;
* A Cloud that requires multiple SRIOV PCI groups&lt;br /&gt;
:# create all the pci-groups in the cloud by invoking a Nova API&lt;br /&gt;
:# on compute nodes that support a single pci group and in which all of the SRIOV ports belong to this group, set sriov_auto_all=on, sriov_pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# on compute nodes that support multiple pci groups, define the pci-passthrough-list&lt;br /&gt;
&lt;br /&gt;
:In such a cloud, when booting a VM with sriov macvtap, the nova boot command would look like:&lt;br /&gt;
     nova boot --flavor m1.large --image &amp;lt;image_id&amp;gt; &lt;br /&gt;
                    --nic net-id=&amp;lt;net-id&amp;gt;,vnic-type=macvtap,pci-group=&amp;lt;group-name&amp;gt; &amp;lt;vm-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Introducing new compute nodes with SRIOV into an existing cloud&lt;br /&gt;
:Depending on the cloud and the compute node being introduced:&lt;br /&gt;
:# it could be as simple as adding sriov_auto_all=on into the nova config file&lt;br /&gt;
:# it could be setting sriov_auto_all=on and pci_group=&amp;lt;group_name&amp;gt;&lt;br /&gt;
:# it could be defining the pci-passthrough-list.&lt;br /&gt;
&lt;br /&gt;
* NIC hot plug&lt;br /&gt;
&lt;br /&gt;
=== Evolving Design Doc ===&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/document/d/1EMwDg9J8zOxzvTnQJ9HwZdiotaVstFWKIuKrPse6JOs/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Ian typed up a complete proposal in two sections in that document, which is pulled out here: https://docs.google.com/document/d/1svN89UXKbFoka0EF6MFUP6OwdNvhY4OkdjEZN-rD-0Q/edit#  - this proposal takes the 'PCI groups via compute node config' approach and makes no attempt at proposing APIs.&lt;br /&gt;
&lt;br /&gt;
=== Previous Meetings ===&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough_meeting/2013/pci_passthrough_meeting.2013-12-24-14.02.log.html&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/pci_passthrough/&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on Dec. 17th, 2013'''&lt;br /&gt;
[[Meetings/Passthrough/dec-17th-2013.log]]&lt;br /&gt;
&lt;br /&gt;
:'''Meeting log on June. 17th, 2014'''&lt;br /&gt;
http://eavesdrop.openstack.org/meetings/passthrough/2014/passthrough.2014-06-17-13.07.log.html&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55705</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55705"/>
				<updated>2014-06-12T14:41:45Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc_support_old_agents'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55360</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55360"/>
				<updated>2014-06-10T14:07:17Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55356</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55356"/>
				<updated>2014-06-10T13:58:45Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API. &lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch functionality as part of the VPI (Ethernet/InfiniBand) HCA. Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron plugin. &lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types. For vnic type configuration API details, please refer to configuration reference guide (click [http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html here]). Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access). &lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
 &lt;br /&gt;
• Mellanox OpenStack Neutron Agent (L2 Agent) runs on each compute node. &lt;br /&gt;
&lt;br /&gt;
• Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
It is assumed that OpenStack is installed with ML2 plugin.&lt;br /&gt;
&lt;br /&gt;
You can do it by using packstack:&lt;br /&gt;
&lt;br /&gt;
1.Create an answer file &lt;br /&gt;
    #packstack --gen-answer-file=GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
2. Change the following in  GEN_ANSWER_FILE&lt;br /&gt;
    CONFIG_NEUTRON_L2_PLUGIN=ml2&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan&lt;br /&gt;
    CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch&lt;br /&gt;
    CONFIG_NEUTRON_ML2_VLAN_RANGES=default:2:10&lt;br /&gt;
    CONFIG_NEUTRON_L2_AGENT=openvswitch&lt;br /&gt;
&lt;br /&gt;
3. Run packstack&lt;br /&gt;
    #packstack --answer-file==GEN_ANSWER_FILE&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. Download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget -O /etc/yum.repos.d/mlnx-icehouse.repo  http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5. Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6. Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   #/etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   #/etc/init.d/eswitchd restart&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
   # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
In case you use MLNX-OFED older than 2.1,  Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/openstack/pdf/mellanox-openstack-solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55182</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55182"/>
				<updated>2014-06-08T07:07:46Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at (symbolic link) /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6.Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55181</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55181"/>
				<updated>2014-06-08T07:07:02Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in /etc/neutron/neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6.Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55180</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55180"/>
				<updated>2014-06-08T07:06:06Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.2 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6.Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55179</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=55179"/>
				<updated>2014-06-08T07:04:49Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.2 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6.Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53528</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53528"/>
				<updated>2014-05-26T07:18:26Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
6.Start the l3 Agent:&lt;br /&gt;
 #/etc/init.d/neutron-l3-agent restart&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53527</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53527"/>
				<updated>2014-05-26T07:17:27Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
5.Configure the l3 agent configuration file /etc/neutron/l3_agent.ini&lt;br /&gt;
&lt;br /&gt;
    gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336&lt;br /&gt;
    router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36&lt;br /&gt;
    interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver&lt;br /&gt;
    external_network_bridge = br-ex&lt;br /&gt;
&lt;br /&gt;
The above is an example for configuring one router for tenants. Your values for gateway_external_network_id,router_id  and external_network_bridge  may differ.&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53524</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53524"/>
				<updated>2014-05-26T07:11:06Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Network Node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron Open vSwitch Agent, Neutron dhcp Agent and l3 Agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-openvswitch&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   bridge_mappings = default:br-eth3,public:br-ex &lt;br /&gt;
(Here public is the physical external network)&lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #//etc/init.d/neutron-openvswitch-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53523</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53523"/>
				<updated>2014-05-26T06:52:52Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53522</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53522"/>
				<updated>2014-05-26T06:47:34Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53446</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53446"/>
				<updated>2014-05-25T14:26:40Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Icehouse), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53444</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53444"/>
				<updated>2014-05-25T14:24:24Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:60001')&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/icehouse/etc/neutron/plugins/mlnx/mlnx_conf.ini Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53443</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53443"/>
				<updated>2014-05-25T14:00:45Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx,openvswitch&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53442</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53442"/>
				<updated>2014-05-25T14:00:27Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53441</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53441"/>
				<updated>2014-05-25T14:00:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53440</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53440"/>
				<updated>2014-05-25T13:59:03Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Start Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/havana/repo/mlnx-havana/mlnx-havana.repo -O /etc/yum.repos.d/mlnx-havana.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53439</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53439"/>
				<updated>2014-05-25T13:58:47Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #/etc/init.d/neutron-server start&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/havana/repo/mlnx-havana/mlnx-havana.repo -O /etc/yum.repos.d/mlnx-havana.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53438</id>
		<title>Mellanox-Neutron-Icehouse-Redhat</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Mellanox-Neutron-Icehouse-Redhat&amp;diff=53438"/>
				<updated>2014-05-25T13:58:18Z</updated>
		
		<summary type="html">&lt;p&gt;Itzikb: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
  &lt;br /&gt;
= Page is under construction =&lt;br /&gt;
&lt;br /&gt;
Note: The page is not ready yet. &lt;br /&gt;
&lt;br /&gt;
Once it will be ready, the note will be removed.&lt;br /&gt;
&lt;br /&gt;
= Overview = &lt;br /&gt;
== Mellanox Neutron ML2 Driver ==&lt;br /&gt;
Mellanox ML2 Mechanism Driver implements the ML2 Plugin Mechanism Driver API.&lt;br /&gt;
&lt;br /&gt;
This driver supports Mellanox embedded switch  functionality as part of the VPI (Ethernet/InfiniBand) HCA.&lt;br /&gt;
Mellanox ML2 Mechanism Driver provides functional parity with Mellanox Neutron pluign.&lt;br /&gt;
&lt;br /&gt;
Mellanox ML2 Mechanism Driver supports DIRECT (pci passthrough) and MACVTAP (virtual interface with a tap-like software interface) vnic types.&lt;br /&gt;
For vnic type configuration API details, please refer to configuration reference guide http://docs.openstack.org/api/openstack-network/2.0/content/binding_ext_ports.html.&lt;br /&gt;
Hardware vNICs mapped to the guest VMs allow higher performance and advanced features such as RDMA (remote direct memory access).&lt;br /&gt;
&lt;br /&gt;
The driver supports VLAN network type to facilitate virtual networks either on Ethernet or InfiniBand fabrics.&lt;br /&gt;
&lt;br /&gt;
* Mellanox Openstack Neutron Agent (L2 Agent) runs on each compute node.&lt;br /&gt;
* Agent should apply VIF connectivity based on mapping between a VIF (VM vNIC) and Embedded Switch port.&lt;br /&gt;
&lt;br /&gt;
== Mellanox Neutron Plugin ==&lt;br /&gt;
Please note,&lt;br /&gt;
Mellanox Plug-in is deprecated in the Icehouse release and won't be supported in the Juno release.&lt;br /&gt;
The features in the plug-in are now part of the ML2 plug-in in the form of Mellanox mechanism driver.&lt;br /&gt;
&lt;br /&gt;
For details regarding Mellanox Neutron plugin, please refer to https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat.&lt;br /&gt;
&lt;br /&gt;
==  Mellanox Nova VIF Driver ==&lt;br /&gt;
The Mellanox Nova VIF driver should be used when running Mellanox Mechnism Driver. The VIF driver supports the VIF plugin by binding vNIC of type DIRECT  to the embedded switch port.&lt;br /&gt;
VIF Driver for MACVTAP type is included in Nova libvirt generic vif driver. For SR-IOV pass-through (vnic type DIRECT) one needs to use VIF driver from Mellanox git repository or RPM.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installation with Red Hat Enterprise Linux OpenStack Platform'''&lt;br /&gt;
&lt;br /&gt;
Make sure you follow Red Hat prerequisites as required by Red Hat Enterprise Linux OpenStack Platform. Please refer to https://access.redhat.com/products/Cloud/OpenStack/ for additional information regarding this product.&lt;br /&gt;
&lt;br /&gt;
Other Red Hat references:&lt;br /&gt;
&lt;br /&gt;
1. [http://www.redhat.com/resourcelibrary/reference-architectures/deploying-and-using-red-hat-openstack-rhos-2-dot-1 RHOS reference document]&lt;br /&gt;
&lt;br /&gt;
2. [http://openstack.redhat.com/Quickstart RDO QuickStart]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Neutron server'''&lt;br /&gt;
&lt;br /&gt;
No special prerequisites needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compute Nodes'''&lt;br /&gt;
&lt;br /&gt;
1. python-pip (use &amp;quot;yum install python-pip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
2. Compute nodes should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
3. Mellanox OFED 2.0.3 or greater is installed.Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
4. Enable SR-IOV on ConnectX-3 card. Refer to [http://community.mellanox.com/docs/DOC-1317 Mellanox Community]&lt;br /&gt;
&lt;br /&gt;
5. The software package iproute2 - ([https://www.kernel.org/pub/linux/utils/net/iproute2/ Code] [http://www.policyrouting.org/iproute2.doc.html Documentation]) must be installed. Required only to be installed on compute nodes&lt;br /&gt;
&lt;br /&gt;
6. The software package ethtool ([http://www.kernel.org/pub/software/network/ethtool/ Code]) must be installed (version 3.8 or higher). Required only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
7. oslo.config (use &amp;quot;pip-python install oslo.config&amp;quot;). Reuired only to be installed on compute nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Network Node'''&lt;br /&gt;
&lt;br /&gt;
1. Network node should be equipped with Mellanox ConnectX®-3 Network Adapter ([http://www.mellanox.com/page/infiniband_cards_overview link])&lt;br /&gt;
&lt;br /&gt;
2. Mellanox OFED 2.0.3 or greater is installed. Refer to Mellanox website for the latest OFED ([http://www.mellanox.com/page/products_dyn?product_family=26&amp;amp;mtag=linux_sw_drivers])&lt;br /&gt;
&lt;br /&gt;
= Ethernet Network =&lt;br /&gt;
== Neutron Server Node ==&lt;br /&gt;
&lt;br /&gt;
=== Installation   ===&lt;br /&gt;
1. Make sure ML2 plugin is the current Neutron plugin by checking core_plugin option in neutron.conf:&lt;br /&gt;
   core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin&lt;br /&gt;
&lt;br /&gt;
2. Make sure /etc/neutron/plugin.ini is pointing at /etc/neutron/plugins/ml2/ml2_conf.ini&lt;br /&gt;
&lt;br /&gt;
3.Modify /etc/neutron/plugins/ml2/ml2_conf.ini and include the following: &lt;br /&gt;
 [ml2]&lt;br /&gt;
 type_drivers = vlan,flat&lt;br /&gt;
 tenant_network_types = vlan&lt;br /&gt;
 mechanism_drivers = mlnx&lt;br /&gt;
 [ml2_type_vlan]&lt;br /&gt;
 network_vlan_ranges = default:2:100&lt;br /&gt;
 [eswitch]&lt;br /&gt;
 vnic_type = hostdev&lt;br /&gt;
 apply_profile_patch = True&lt;br /&gt;
&lt;br /&gt;
Click [http://docs.openstack.org/trunk/config-reference/content/networking-options-plugins-ml2.html here] for ML2 configuration options.&lt;br /&gt;
&lt;br /&gt;
4.Restart Neutron server&lt;br /&gt;
   service neutron-server restart&lt;br /&gt;
&lt;br /&gt;
=== Start Services ===&lt;br /&gt;
Start (or restart) the Neutron server&lt;br /&gt;
   #/etc/init.d/neutron-server start&lt;br /&gt;
&lt;br /&gt;
==  Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
1. If you didn't download Mellanox OpenStack repo file download it :&lt;br /&gt;
 #wget http://www.mellanox.com/downloads/solutions/openstack/havana/repo/mlnx-havana/mlnx-havana.repo -O /etc/yum.repos.d/mlnx-havana.repo&lt;br /&gt;
&lt;br /&gt;
2. Install the eswitchd RPM:&lt;br /&gt;
 #yum install eswitchd&lt;br /&gt;
&lt;br /&gt;
3. In case you would like to use Ethernet in para-virtualized mode the VIF driver is already included in Nova package. Otherwise, Install Mellanox VIF driver (Make sure nova is installed on your server)&lt;br /&gt;
 #yum install mlnxvif&lt;br /&gt;
&lt;br /&gt;
4. Install the required RPM for the Neutron agent:&lt;br /&gt;
 #yum install openstack-neutron-mellanox&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
1. Configure /etc/eswitchd/eswitchd.conf if needed&lt;br /&gt;
&lt;br /&gt;
Please Refer to Mellanox Community for the eSwitchd installation notes ( click  [http://community.mellanox.com/docs/DOC-1126 here])&lt;br /&gt;
&lt;br /&gt;
2. Modify /etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
    compute_driver=nova.virt.libvirt.driver.LibvirtDriver&lt;br /&gt;
    libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
    security_group_api=nova&lt;br /&gt;
    connection_type=libvirt&lt;br /&gt;
&lt;br /&gt;
In case you didn't install the Mellanox VIF driver, and you plan to use Ethernet only in paravirtualized ,mode: change the following:&lt;br /&gt;
    libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver&lt;br /&gt;
&lt;br /&gt;
3. Modify the /etc/neutron/plugins/mlnx/mlnx_conf.ini file to reflect your environment. &lt;br /&gt;
&lt;br /&gt;
   [AGENT]&lt;br /&gt;
   '''polling_interval''' - Polling interval (in seconds) for existing vNICs. The default is 2 seconds.&lt;br /&gt;
   '''rpc'''  - must be set to 'True'&lt;br /&gt;
&lt;br /&gt;
   [ESWITCH]&lt;br /&gt;
   '''physical_interface_mapping''' -  the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that physical network. The format of this paramter is:     &amp;lt;fabric name&amp;gt;:&amp;lt; PF name&amp;gt; (Only releavant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for automatic Infiniband configuration.The default is  &amp;quot;default:autoeth&amp;quot;.  &lt;br /&gt;
   '''vnic_type''' - type of VM network interface: 'mlnx_direct' or 'hostdev' according to libvirt terminology.&lt;br /&gt;
         hostdev: this is the traditional method of assigning any generic PCI device to a guest (SR-IOV).&lt;br /&gt;
         mlnx_direct: this is a method to provide macvtap device on top of the PCI device (default).&lt;br /&gt;
         bridge:  - When using Linux Bridge Plugin on top of eIPoIB device&lt;br /&gt;
   '''daemon_endpoint''' - eswitch daemon end point connection (URL) (default value='tcp://127.0.0.1:5001')&lt;br /&gt;
                     daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
   '''request_timeout''' - the number of milliseconds the agent will wait for response on request to daemon. (default=3000 msec)&lt;br /&gt;
&lt;br /&gt;
'''Note''': daemon_endpoint should be changed to tcp://127.0.0.1:60001&lt;br /&gt;
							  &lt;br /&gt;
For a plugin configuration file example (Havana), please refer to [https://github.com/openstack/neutron/blob/stable/havana/etc/neutron/plugins/mlnx/mlnx_conf.inii Mellanox config *ini file].&lt;br /&gt;
&lt;br /&gt;
=== Start Services  ===&lt;br /&gt;
&lt;br /&gt;
1. Restart Nova.&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
2. Start eswitch Daemon &lt;br /&gt;
    #/etc/init.d/eswitchd start&lt;br /&gt;
&lt;br /&gt;
3. Start the Neutron agent&lt;br /&gt;
   #/etc/init.d/neutron-mlnx-agent start&lt;br /&gt;
&lt;br /&gt;
Note: eswitch Daemon should be running before the Neutron Agent is started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
1. Install Neutron linux bridge plugin and Neutron dhcp l3-agent:&lt;br /&gt;
&lt;br /&gt;
   #yum install openstack-neutron-linuxbridge&lt;br /&gt;
&lt;br /&gt;
2. Change the following configuration of the ini file (/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini). The &amp;quot;default&amp;quot; in the example is the name of the physical network as configured in /etc/neutron/plugins/mlnx/mlnx_conf.ini  . &lt;br /&gt;
&lt;br /&gt;
   physical_interface_mappings = default:eth2 &lt;br /&gt;
&lt;br /&gt;
3. Configure the DHCP server according to the following guidelines&lt;br /&gt;
&lt;br /&gt;
Update the following file: /etc/neutron/dhcp_agent.ini with:&lt;br /&gt;
   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver &lt;br /&gt;
&lt;br /&gt;
For additional information refer to:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html&lt;br /&gt;
&lt;br /&gt;
4. Start the DHCP server&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent start&lt;br /&gt;
   #/etc/init.d/neutron-dhcp-agent start&lt;br /&gt;
&lt;br /&gt;
= InfiniBand Network = &lt;br /&gt;
The Mellanox Neutron Plugin use InfiniBand Partitions (PKeys) to separate Networks.&lt;br /&gt;
&lt;br /&gt;
== SM Configuration  ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - Without UFM===&lt;br /&gt;
&lt;br /&gt;
All the PKeys should be predefined in the partitions.conf file (/etc/opensm/partitions.conf)&lt;br /&gt;
(Automatic cofiguration is planned in future phase)&lt;br /&gt;
&lt;br /&gt;
Add/Change the following in the partitions.conf file&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
For every network you want to configure in Neutron you have to configure the pkey associated with the VLAN of this network (defined in Neutron). &lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
If we have 10 VLANs defined in configuration in /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [MLNX]&lt;br /&gt;
   network_vlan_ranges = default:1:10&lt;br /&gt;
&lt;br /&gt;
We'll have the following configuration of the the partitions.conf file:&lt;br /&gt;
 &lt;br /&gt;
   management=0x7fff,ipoib, sl=0, defmember=full : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL;&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/opensm/opensm.conf:&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart the openSM &lt;br /&gt;
   #/etc/init.d/opensmd restart&lt;br /&gt;
&lt;br /&gt;
=== OpenSM configuration - With UFM===&lt;br /&gt;
&lt;br /&gt;
1. Make sure UFM is installed and connected to your fabric.&lt;br /&gt;
&lt;br /&gt;
2. Edit /opt/ufm/conf/opensm/opensm.conf and change the following values:&lt;br /&gt;
&lt;br /&gt;
a) set allow_both_pkeys to TRUE (by default allow_both_pkeys are FALSE):&lt;br /&gt;
&lt;br /&gt;
   #Allow both full and limited membership on the same partition&lt;br /&gt;
   allow_both_pkeys TRUE&lt;br /&gt;
&lt;br /&gt;
b) set sm_assign_guid_func to uniq_count (by default sm_assign_guid_func is base_port)&lt;br /&gt;
&lt;br /&gt;
   #SM assigned Alias GUIDs algorithm&lt;br /&gt;
   sm_assign_guid_func uniq_count&lt;br /&gt;
&lt;br /&gt;
3. Edit UFM user extension partitions.conf for overriding default partitioning configuration.&lt;br /&gt;
&lt;br /&gt;
a) Edit file: /opt/ufm/conf/partitions.conf.user_ext (it should be empty after UFM fresh installation)&lt;br /&gt;
&lt;br /&gt;
b) add the following line to file which enable both full and limited management pkey:&lt;br /&gt;
&lt;br /&gt;
   management=0xffff,ipoib, sl=0, defmember=both : ALL, ALL_SWITCHES=full,SELF=full;&lt;br /&gt;
&lt;br /&gt;
c) Add the additional pkeys definitions which are relevant to the specific setup - for example:&lt;br /&gt;
&lt;br /&gt;
   vlan1=0x1, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan2=0x2, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan3=0x3, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan4=0x4, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan5=0x5, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan6=0x6, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan7=0x7, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan8=0x8, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan9=0x9, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xa, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xb, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xc, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xd, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xe, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0xf, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x10, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x11, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
   vlan10=0x12, ipoib, sl=0, defmember=full : ALL_CAS;&lt;br /&gt;
&lt;br /&gt;
4. Restart UFM&lt;br /&gt;
 &lt;br /&gt;
Stand-alone&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmd restart&lt;br /&gt;
&lt;br /&gt;
High-availability&lt;br /&gt;
&lt;br /&gt;
   /etc/init.d/ufmha restart&lt;br /&gt;
&lt;br /&gt;
== Neutron Server Node==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Change the following in  the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = hostdev&lt;br /&gt;
   network_vlan_ranges = default:1:10 &lt;br /&gt;
   (sql_connection and reconnect_interval  can be configured as described above)&lt;br /&gt;
&lt;br /&gt;
The mapping between VLAN and PKEY is as follows: VLAN X = PKEY 0x8000 + X. For example: vlan 2 is pkey 0x8002&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
&lt;br /&gt;
On the controller, configure the file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
   tenant_network_type = ib&lt;br /&gt;
   vnic_type = bridge&lt;br /&gt;
&lt;br /&gt;
== Compute Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== SR-IOV ===&lt;br /&gt;
SR-IOV is a passthrough mode.&lt;br /&gt;
Perform the following changes:&lt;br /&gt;
&lt;br /&gt;
Create the file /etc/modprobe.d/mlx4_ib.conf and put:&lt;br /&gt;
    options mlx4_ib sm_guid_assign=0&lt;br /&gt;
&lt;br /&gt;
In  The file /etc/neutron/plugins/mlnx/mlnx_conf.ini&lt;br /&gt;
    physical_interface_mapping = default:autoib&lt;br /&gt;
&lt;br /&gt;
Tenant_network_type , vnic_type and network_vlan_ranges parameters should be configured as the controller.&lt;br /&gt;
&lt;br /&gt;
autoib can be replaced by the name of the PF.   &lt;br /&gt;
&lt;br /&gt;
Change the file /etc/eswitchd/eswitchd.conf&lt;br /&gt;
   fabrics  = default:autoib (or default:ib0)&lt;br /&gt;
&lt;br /&gt;
The driver should be restarted &lt;br /&gt;
    /etc/init.d/openibd restart&lt;br /&gt;
eswitchd should be started and then Neutron agent should be started&lt;br /&gt;
   /etc/init.d/eswitchd restart&lt;br /&gt;
   /etc/init.d/neutron-mlnx-agent restart&lt;br /&gt;
&lt;br /&gt;
Verify Mellanox VIF driver is configured in /etc/nova/nova.conf &lt;br /&gt;
   libvirt_vif_driver=mlnxvif.vif.MlxEthVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
=== Para-Virtualized ===&lt;br /&gt;
Here we use the Linux Bridge plugin.&lt;br /&gt;
&lt;br /&gt;
eIPoIB module should be up and configured.In /etc/infiniband/openib.conf:&lt;br /&gt;
 E_IPOIB_LOAD=yes&lt;br /&gt;
&lt;br /&gt;
And restart openibd:&lt;br /&gt;
 #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Please refer to eIPoIB configuration in Mellanox OFED User Manual&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we have the eIPoIB interface, we use it in the linux bridge agent configuration:&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
Assuming eth1 is the eIPoIB interface:&lt;br /&gt;
&lt;br /&gt;
To check that the interface type is eIPoIB run the command (verify that the driver is &amp;quot;eth_ipoib&amp;quot;)&lt;br /&gt;
   #ethtool -i &amp;lt;interface&amp;gt; &lt;br /&gt;
   '''driver: eth_ipoib'''&lt;br /&gt;
   version: 1.0.0&lt;br /&gt;
   firmware-version: 1 &lt;br /&gt;
   bus-info: ib0&lt;br /&gt;
   supports-statistics: yes&lt;br /&gt;
   supports-test: no&lt;br /&gt;
   supports-eeprom-access: no&lt;br /&gt;
   supports-register-dump: no&lt;br /&gt;
   supports-priv-flags: no&lt;br /&gt;
&lt;br /&gt;
Change the file /etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini&lt;br /&gt;
&lt;br /&gt;
   [linux_bridge] &lt;br /&gt;
   physical_interface_mappings =  default:eth1   &lt;br /&gt;
&lt;br /&gt;
Configure the Linux Bridge VIF Driver in /etc/nova/nova.conf&lt;br /&gt;
   #libvirt_vif_driver=nova.virt.libvirt.vif.NeutronLinuxBridgeVIFDriver&lt;br /&gt;
&lt;br /&gt;
Restart nova&lt;br /&gt;
   #/etc/init.d/openstack-nova-compute restart&lt;br /&gt;
&lt;br /&gt;
After confiuration Linux Bridge agent should be restarted.&lt;br /&gt;
   #/etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
== Network Node ==&lt;br /&gt;
&lt;br /&gt;
Configure the Linux bridge plugin as described in InfiniBand Para-Virtualized section (above).&lt;br /&gt;
&lt;br /&gt;
=== DHCP Server ===&lt;br /&gt;
&lt;br /&gt;
For DHCP support – The Network node should  use the Mellanox Dnsmasq driver as the DHCP driver.&lt;br /&gt;
    # yum install mlnx-dnsmasq&lt;br /&gt;
&lt;br /&gt;
Change the following in /etc/neutron/dhcp_agent.ini&lt;br /&gt;
   dhcp_driver = mlnx_dhcp.MlnxDnsmasq&lt;br /&gt;
&lt;br /&gt;
Copy ipoibd  and override /sbin/ipoibd&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/ipoibd&lt;br /&gt;
   #cp ipoibd /sbin/ipoibd&lt;br /&gt;
   '''Note:''' If you have OFED &amp;gt;= 2.1 the above step is not needed&lt;br /&gt;
&lt;br /&gt;
Download and apply a patch for Linux Bridge Agent:&lt;br /&gt;
&lt;br /&gt;
   #wget http://www.mellanox.com/downloads/solutions/openstack/havana/patches/linuxbridge_neutron_agent.py.patch&lt;br /&gt;
   #cd /usr/lib/python2.6/site-packages/neutron/plugins/linuxbridge/agent&lt;br /&gt;
   #patch -p1 &amp;lt; linux_bridge_agent.py.patch &lt;br /&gt;
&lt;br /&gt;
Restart openibd&lt;br /&gt;
   #/etc/init.d/openibd restart&lt;br /&gt;
&lt;br /&gt;
Start linux bridge agent&lt;br /&gt;
   /etc/init.d/neutron-linuxbridge-agent restart&lt;br /&gt;
&lt;br /&gt;
Start dhcp server&lt;br /&gt;
   /etc/init.d/neutron-dhcp-agent restart&lt;br /&gt;
&lt;br /&gt;
= Usage Examples =&lt;br /&gt;
* In order to create SR-IOV interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating an SR-IOV Instance&amp;quot; chapter] &lt;br /&gt;
* In order to create Para-Virtualized interface refer to [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack solution document &amp;quot;Creating a Para-Virtualized vNIC Instance&amp;quot; chapter]&lt;br /&gt;
&lt;br /&gt;
= Known issues and Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
For known issues and troubleshooting options refer to  [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. [http://www.mellanox.com/openstack/ http://www.mellanox.com/openstack/]&lt;br /&gt;
&lt;br /&gt;
2. [https://github.com/mellanox-openstack Source repository]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.mellanox.com/page/products_dyn?product_family=26 Mellanox OFED]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.mellanox.com/sdn/stage/pdf/Mellanox-OpenStack-OpenFlow-Solution.pdf Mellanox OpenStack Solution Reference Architecture]&lt;br /&gt;
&lt;br /&gt;
5. [http://community.mellanox.com/docs/DOC-1127 Mellanox OpenStack Troubleshooting]&lt;br /&gt;
&lt;br /&gt;
For more details, please refer your question to  [mailto:openstack@mellanox.com openstack@mellanox.com]&lt;br /&gt;
&lt;br /&gt;
Return to [https://wiki.openstack.org/wiki/Mellanox-OpenStack  Mellanox-OpenStack] wiki page.&lt;/div&gt;</summary>
		<author><name>Itzikb</name></author>	</entry>

	</feed>