aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Trautman <ctrautma@redhat.com>2016-08-15 13:44:27 -0400
committerChristian Trautman <ctrautma@redhat.com>2016-08-16 08:58:42 -0400
commit32361ffed1efce856e56a04029dcb72e5dcbf02d (patch)
tree22f4900605e6984c7949443a57d3790c863f8310
parenta8ef2c308d4c385b8eb0cae0f7f1f2d039affaaf (diff)
old_style_multi-queue: Allows for multi-queue with ovs <= 2.5.0
Enables multi-queue option for OVS versions 2.5.0 or less with dpdk. Instead of enabling MQ on a port by port basis this sets the global MQ option after starting the ovs switch. JIRA: VSPERF-372 Change-Id: I245c76779695518d0005122d8214bbf3f141bb96 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
-rw-r--r--conf/02_vswitch.conf4
-rwxr-xr-xdocs/userguide/testusage.rst11
-rw-r--r--vswitches/ovs_dpdk_vhost.py15
3 files changed, 26 insertions, 4 deletions
diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf
index 81632d56..3d72d348 100644
--- a/conf/02_vswitch.conf
+++ b/conf/02_vswitch.conf
@@ -88,6 +88,10 @@ VSWITCHD_DPDK_CONFIG = {
# 0 = disabled
VSWITCH_MULTI_QUEUES = 0
+# Use old style OVS Multi-queue startup. If testing versions of OVS 2.5.0 or
+# before, enable this setting to allow multi-queue to enable correctly.
+OVS_OLD_STYLE_MQ = False
+
# parameters passed to ovs-vswitchd in case that OvsVanilla is selected
VSWITCHD_VANILLA_ARGS = []
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index c020b6ca..0c6e189d 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -463,6 +463,13 @@ VSPerf currently supports multi-queue with the following limitations:
default upstream package versions installed by VSPerf satisfy this
requirement.
+ 5. If using OVS versions 2.5.0 or less enable old style multi-queue as shown in
+ the ''02_vswitch.conf'' file.
+
+ .. code-block:: console
+
+ OVS_OLD_STYLE_MQ = True
+
To enable multi-queue modify the ''02_vswitch.conf'' file to enable multi-queue
on the switch.
@@ -476,7 +483,9 @@ applies by checking /sys/class/net/<eth_name>/device/numa_node and setting an
appropriate mask to create PMD threads on the same numa node.
When multi-queue is enabled, each dpdk or dpdkvhostuser port that is created
-on the switch will set the option for multiple queues.
+on the switch will set the option for multiple queues. If old style multi queue
+has been enabled a global option for multi queue will be used instead of the
+port by port option.
To enable multi-queue on the guest modify the ''04_vnf.conf'' file.
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 0950c426..39c8b633 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -72,12 +72,20 @@ class OvsDpdkVhost(IVSwitchOvs):
"""
dpdk.init()
super(OvsDpdkVhost, self).start()
+ # old style OVS <= 2.5.0 multi-queue enable
+ if settings.getValue('OVS_OLD_STYLE_MQ') and \
+ int(settings.getValue('VSWITCH_MULTI_QUEUES')):
+ tmp_br = OFBridge(timeout=-1)
+ tmp_br.set_db_attribute(
+ 'Open_vSwitch', '.', 'other_config:' +
+ 'n-dpdk-rxqs', settings.getValue('VSWITCH_MULTI_QUEUES'))
def stop(self):
"""See IVswitch for general description
Kills ovsdb and vswitchd and removes DPDK kernel modules.
"""
+
super(OvsDpdkVhost, self).stop()
dpdk.cleanup()
dpdk.remove_vhost_modules()
@@ -90,7 +98,6 @@ class OvsDpdkVhost(IVSwitchOvs):
switch_params = switch_params + params
super(OvsDpdkVhost, self).add_switch(switch_name, switch_params)
-
if settings.getValue('VSWITCH_AFFINITIZATION_ON') == 1:
# Sets the PMD core mask to VSWITCH_PMD_CPU_MASK
# for CPU core affinitization
@@ -109,7 +116,8 @@ class OvsDpdkVhost(IVSwitchOvs):
port_name = 'dpdk' + str(dpdk_count)
params = ['--', 'set', 'Interface', port_name, 'type=dpdk']
# multi-queue enable
- if int(settings.getValue('VSWITCH_MULTI_QUEUES')):
+ if int(settings.getValue('VSWITCH_MULTI_QUEUES')) and \
+ not settings.getValue('OVS_OLD_STYLE_MQ'):
params += ['options:n_rxq={}'.format(
settings.getValue('VSWITCH_MULTI_QUEUES'))]
of_port = bridge.add_port(port_name, params)
@@ -133,7 +141,8 @@ class OvsDpdkVhost(IVSwitchOvs):
port_name = 'dpdkvhostuser' + str(vhost_count)
params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhostuser']
# multi queue enable
- if int(settings.getValue('VSWITCH_MULTI_QUEUES')):
+ if int(settings.getValue('VSWITCH_MULTI_QUEUES')) and \
+ not settings.getValue('OVS_OLD_STYLE_MQ'):
params += ['options:n_rxq={}'.format(
settings.getValue('VSWITCH_MULTI_QUEUES'))]
of_port = bridge.add_port(port_name, params)