integration: fix ovsdpdk_mq_pvp_rxqs_testpmd 74/68674/3
authorLukasz Pawlik <lukaszx.pawlik@intel.com>
Mon, 7 Oct 2019 06:48:53 +0000 (07:48 +0100)
committerEmma Finn <emma.finn@intel.com>
Tue, 29 Oct 2019 11:04:50 +0000 (11:04 +0000)
Parameters passed to testpmd are changed in DPDK 18.11. Setting
stat-qmap does not work from command line it can be set only from
testpmd application before port forwarding is started. Decrease frame
rate on traffic generator to receive traffic on two queues.

Change-Id: I82b8e478226d59b091154d325afed07327908250
Signed-off-by: Lukasz Pawlik <lukaszx.pawlik@intel.com>
conf/04_vnf.conf
conf/__init__.py
conf/integration/01b_dpdk_regression_tests.conf
vnfs/qemu/qemu.py

index cf44a8e..a6a31e9 100644 (file)
@@ -215,3 +215,11 @@ GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- '
 # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
 # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
 GUEST_TESTPMD_FWD_MODE = ['csum']
+
+# map queue stats to separate regs to verify MQ functionality
+# setting this from testpmd command line prameters since DPDK 18.11 does not
+# work as expected so we have to set this inside testpmd i.e. to set rx queue
+# 2 on port 0 to mapping 5 add: "rx 0 2 5"
+# Please see DPDK documentation to get more information how to set stat_qmap
+# (https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html)
+GUEST_QUEUE_STATS_MAPPING = []
index 83c5475..6dff836 100644 (file)
@@ -256,6 +256,9 @@ class Settings(object):
         Expand VM option with given key for given number of VMs
         """
         tmp_value = self.getValue(key)
+        # skip empty/not set value
+        if not tmp_value:
+            return
         if isinstance(tmp_value, str):
             scalar = True
             master_value = tmp_value
index 960f47f..e84a616 100644 (file)
@@ -593,15 +593,14 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
             "GUEST_SMP" : ['5'],
             "GUEST_TESTPMD_PARAMS" : ['-c 0x1F -n 4 --socket-mem 512 -- '
                                       '--burst=64 -i --nb-cores=4 '
-                                      # map queue stats to separate regs to verify MQ functionality
-                                      '--rx-queue-stats-mapping=\(0,0,0\),\(0,1,1\),\(1,0,2\),\(1,1,3\) '
-                                      '--tx-queue-stats-mapping=\(0,0,4\),\(0,1,5\),\(1,0,6\),\(1,1,7\) '
                                       '--rxq=2 --txq=2'],
             "TRAFFICGEN_DURATION" : 5,
             "TRAFFIC" : {
                 "traffic_type" : "rfc2544_continuous",
                 "multistream" : 3,
                 "stream_type" : "L3",
+                "frame_rate" : 1,
+                "learning_frames" : False,
                 'l3': {
                     'enabled': True,
                     'proto': 'udp',
@@ -609,6 +608,15 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [
                     'dstip': '1.1.1.1',
                 },
             },
+            "GUEST_QUEUE_STATS_MAPPING" : ["rx 0 0 0",
+                                           "rx 0 1 1",
+                                           "rx 1 0 2",
+                                           "rx 1 1 3",
+                                           "tx 0 0 4",
+                                           "tx 0 1 5",
+                                           "tx 1 0 6",
+                                           "tx 1 1 7"
+                                          ]
         },
         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
                      [
index a2c8d4b..fb87ed2 100644 (file)
@@ -398,6 +398,8 @@ class IVnfQemu(IVnf):
 
         self.execute_and_wait('./testpmd {}'.format(testpmd_params), 60, "Done")
         self.execute_and_wait('set fwd ' + self._testpmd_fwd_mode, 20, 'testpmd>')
+        for entry in S.getValue('GUEST_QUEUE_STATS_MAPPING'):
+            self.execute_and_wait('set stat_qmap ' + entry, 2, 'testpmd>')
         self.execute_and_wait('start', 20, 'testpmd>')
 
     def _configure_l2fwd(self):