./vsperf --help
+Executing PVP tests
+-------------------
+To run tests using vhost-user as guest access method:
+
+1. Set VHOST_METHOD and VNF of your settings file to:
+
+ .. code-block:: console
+
+ VHOST_METHOD='user'
+ VNF = 'QemuDpdkVhost'
+
+2. Recompile src for VHOST USER testing
+
+ .. code-block:: console
+
+ cd src
+ make cleanse
+ make VHOST_USER=y
+
+3. Run test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file <path_to_settings_py>
+
+To run tests using vhost-cuse as guest access method:
+
+1. Set VHOST_METHOD and VNF of your settings file to:
+
+ .. code-block:: console
+
+ VHOST_METHOD='cuse'
+ VNF = 'QemuDpdkVhostCuse'
+
+2. Recompile src for VHOST USER testing
+
+ .. code-block:: console
+
+ cd src
+ make cleanse
+ make VHOST_USER=n
+
+3. Run test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file <path_to_settings_py>
+
+
GOTCHAs:
--------
from src.dpdk import dpdk
_VSWITCHD_CONST_ARGS = ['--', '--log-file']
+_VHOST_METHOD = settings.getValue('VHOST_METHOD')
class OvsDpdkVhost(IVSwitch):
"""VSwitch implementation using DPDK and vhost ports
vswitchd_args += settings.getValue('VSWITCHD_DPDK_ARGS')
vswitchd_args += _VSWITCHD_CONST_ARGS
- self._logger.info("Inserting VHOST modules into kernel...")
- dpdk.insert_vhost_modules()
+ if _VHOST_METHOD == "cuse":
+ self._logger.info("Inserting VHOST modules into kernel...")
+ dpdk.insert_vhost_modules()
self._vswitchd = VSwitchd(vswitchd_args=vswitchd_args,
expected_cmd=
"""
bridge = self._bridges[switch_name]
# Changed dpdkvhost to dpdkvhostuser to be able to run in Qemu 2.2
- vhost_method = settings.getValue('VHOST_METHOD')
- if vhost_method == "cuse":
+ if _VHOST_METHOD == "cuse":
vhost_count = self._get_port_count(bridge, 'type=dpdkvhostcuse')
port_name = 'dpdkvhostcuse' + str(vhost_count)
params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhostcuse']