vswitches: Fix error in loading eventfd module 73/1373/3
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>
Wed, 26 Aug 2015 15:35:37 +0000 (16:35 +0100)
committerDino Simeon Madarang <dino.simeonx.madarang@intel.com>
Tue, 1 Sep 2015 22:44:33 +0000 (23:44 +0100)
Load eventfd only when vhost-cuse is specified as
the guest access method.

This commit also includes quickstart update for executing PVP tests.

JIRA: VSPERF-59

Change-Id: I41f116ab1c42f704026567a269922c07994b15a5
Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
Reviewed-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
conf/02_vswitch.conf
docs/quickstart.rst
vswitches/ovs_dpdk_vhost.py

index c7fe03f..e69511b 100644 (file)
@@ -86,4 +86,6 @@ LOG_FILE_OVS = 'ovs.log'
 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
 VSWITCH = "OvsDpdkVhost"
 
-VHOST_METHOD = 'cuse'
+# Use vhost user or vhost cuse
+# Set to cuse if you want to test vhostcuse
+VHOST_METHOD = 'user'
index 5c5b762..e5b433f 100644 (file)
@@ -155,6 +155,55 @@ For all available options, check out the help dialog:
 
     ./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:
 --------
index 2e726a4..b1fd08b 100644 (file)
@@ -22,6 +22,7 @@ from src.ovs import VSwitchd, OFBridge
 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
@@ -42,8 +43,9 @@ class OvsDpdkVhost(IVSwitch):
         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=
@@ -117,8 +119,7 @@ class OvsDpdkVhost(IVSwitch):
         """
         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']