OVS-dpdk support
Introduce dpdk support for neutron OVS configuration
Change-Id: Ibb08f835ec4d4f67b561aff35189c4a493a9f420
Epic: PROD-8957
diff --git a/README.rst b/README.rst
index 3b9eda6..34dc657 100644
--- a/README.rst
+++ b/README.rst
@@ -506,6 +506,32 @@
ovs:
driver: openvswitch
+Neutron OVS DPDK
+==================
+
+Enable datapath netdev for neutron openvswitch agent
+
+.. code-block:: yaml
+
+ neutron:
+ server:
+ version: mitaka
+ ...
+ dpdk: True
+ ...
+
+ neutron:
+ compute:
+ version: mitaka
+ plugin: ml2
+ dpdk: True
+ backend:
+ engine: ml2
+ ...
+ mechanism:
+ ovs:
+ driver: openvswitch
+
Neutron OVS SR-IOV
==================
diff --git a/neutron/files/mitaka/ml2_conf.ini b/neutron/files/mitaka/ml2_conf.ini
index a0879b1..67841f2 100644
--- a/neutron/files/mitaka/ml2_conf.ini
+++ b/neutron/files/mitaka/ml2_conf.ini
@@ -196,7 +196,11 @@
# Driver for security groups firewall in the L2 agent (string value)
#firewall_driver = <None>
+{%- if server.dpdk %}
+firewall_driver = openvswitch
+{%- else %}
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
+{%- endif %}
# Controls whether the neutron security group API is enabled in the server. It should be false when using no security groups or using the
# nova security group API. (boolean value)
diff --git a/neutron/files/mitaka/openvswitch_agent.ini b/neutron/files/mitaka/openvswitch_agent.ini
index 4656e35..b93aaeb 100644
--- a/neutron/files/mitaka/openvswitch_agent.ini
+++ b/neutron/files/mitaka/openvswitch_agent.ini
@@ -207,6 +207,9 @@
# to 'netdev'. (string value)
# Allowed values: system, netdev
#datapath_type = system
+{%- if neutron.dpdk %}
+datapath_type = netdev
+{%- endif %}
# OVS vhost-user socket directory. (string value)
#vhostuser_socket_dir = /var/run/openvswitch
@@ -240,7 +243,11 @@
# Driver for security groups firewall in the L2 agent (string value)
#firewall_driver = <None>
+{%- if neutron.dpdk %}
+firewall_driver = openvswitch
+{%- else %}
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
+{%- endif %}
# Controls whether the neutron security group API is enabled in the server. It should be false when using no security groups or using the
# nova security group API. (boolean value)
diff --git a/neutron/map.jinja b/neutron/map.jinja
index d00f754..795c4ce 100644
--- a/neutron/map.jinja
+++ b/neutron/map.jinja
@@ -3,6 +3,7 @@
'Debian': {
'pkgs': ['neutron-openvswitch-agent', 'openvswitch-switch', 'python-pycadf'],
'services': ['neutron-openvswitch-agent'],
+ 'dpdk': false,
'audit': {
'enabled': false
}
@@ -10,6 +11,7 @@
'RedHat': {
'pkgs': ['openstack-neutron-openvswitch', 'openvswitch', 'python-pycadf'],
'services': ['neutron-openvswitch-agent'],
+ 'dpdk': false,
'audit': {
'enabled': false
}
@@ -19,11 +21,13 @@
{% set gateway = salt['grains.filter_by']({
'Debian': {
'pkgs': ['neutron-dhcp-agent', 'neutron-openvswitch-agent', 'neutron-l3-agent', 'openvswitch-common', 'neutron-metadata-agent'],
- 'services': ['neutron-openvswitch-agent', 'neutron-metadata-agent', 'neutron-l3-agent', 'neutron-dhcp-agent']
+ 'services': ['neutron-openvswitch-agent', 'neutron-metadata-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
+ 'dpdk': false
},
'RedHat': {
'pkgs': ['openstack-neutron-openvswitch'],
- 'services': ['neutron-openvswitch-agent', 'neutron-metadata-agent', 'neutron-l3-agent', 'neutron-dhcp-agent']
+ 'services': ['neutron-openvswitch-agent', 'neutron-metadata-agent', 'neutron-l3-agent', 'neutron-dhcp-agent'],
+ 'dpdk': false
},
}, merge=pillar.neutron.get('gateway', {})) %}
@@ -33,6 +37,7 @@
'pkgs_ml2': ['neutron-plugin-ml2'],
'services': ['neutron-server'],
'notification': False,
+ 'dpdk': false,
'audit': {
'enabled': false
}
@@ -42,6 +47,7 @@
'pkgs': ['openstack-neutron'],
'services': ['neutron-server'],
'notification': False,
+ 'dpdk': false,
'audit': {
'enabled': false
}
diff --git a/tests/pillar/compute_dpdk.sls b/tests/pillar/compute_dpdk.sls
new file mode 100644
index 0000000..0a3a498
--- /dev/null
+++ b/tests/pillar/compute_dpdk.sls
@@ -0,0 +1,25 @@
+neutron:
+ compute:
+ agent_mode: legacy
+ dpdk: True
+ backend:
+ engine: ml2
+ tenant_network_types: "flat,vlan"
+ mechanism:
+ ovs:
+ driver: openvswitch
+ dvr: false
+ enabled: true
+ external_access: false
+ local_ip: 10.1.0.105
+ message_queue:
+ engine: rabbitmq
+ host: 172.16.10.254
+ password: workshop
+ port: 5672
+ user: openstack
+ virtual_host: /openstack
+ metadata:
+ host: 172.16.10.254
+ password: password
+ version: mitaka