vm: use the same testpmd sources inside VM 75/12275/3
authorMartin Klozik <martinx.klozik@intel.com>
Wed, 13 Apr 2016 13:26:07 +0000 (14:26 +0100)
committerMaryam Tahhan <maryam.tahhan@intel.com>
Tue, 19 Apr 2016 13:48:47 +0000 (13:48 +0000)
Always copy testpmd sources from the directory with vHost User
version of DPDK. This will avoid possible issues with missing
dependencies in some VM images. It will also ensure, that testpmd
inside VM is agnostic to chosen vHost method.

Change-Id: I0496cc846eff3f7d4c1aef0a9c825545a4c3c818
JIRA: VSPERF-283
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
testcases/testcase.py
vnfs/qemu/qemu.py
vnfs/qemu/qemu_dpdk_vhost_cuse.py

index ff1247f..7c93579 100644 (file)
@@ -309,8 +309,10 @@ class TestCase(object):
             # copy sources into shared dir only if neccessary
             if 'testpmd' in self.guest_loopback or 'l2fwd' in self.guest_loopback:
                 try:
+                    # always use DPDK vhost user version inside VM, so results are not
+                    # affected by different testpmd behavior inside VM
                     tasks.run_task(['rsync', '-a', '-r', '-l', r'--exclude="\.git"',
-                                    os.path.join(S.getValue('RTE_SDK'), ''),
+                                    os.path.join(S.getValue('RTE_SDK_USER'), ''),
                                     os.path.join(guest_dir, 'DPDK')],
                                    self._logger,
                                    'Copying DPDK to shared directory...',
index 686fb43..c735062 100644 (file)
@@ -251,7 +251,7 @@ class IVnfQemu(IVnf):
 
     def _modify_dpdk_makefile(self):
         """
-        Modifies DPDK makefile in Guest before compilation
+        Modifies DPDK makefile in Guest before compilation if needed
         """
         pass
 
index e5a5e82..ab4fec8 100644 (file)
@@ -56,13 +56,3 @@ class QemuDpdkVhostCuse(IVnfQemu):
                       ',netdev=' + net2 + ',csum=off,gso=off,' +
                       'guest_tso4=off,guest_tso6=off,guest_ecn=off',
                      ]
-
-    # helper functions
-
-    def _modify_dpdk_makefile(self):
-        """
-        Modifies DPDK makefile in Guest before compilation
-        """
-        self.execute_and_wait("sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST_USER=n/" +
-                              "CONFIG_RTE_LIBRTE_VHOST_USER=y/g'" +
-                              "config/common_linuxapp")