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.
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.
"""
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()
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
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)
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)