Add new testcase for LTD.Scalability.RFC2544.0PacketLoss 97/1097/3
authorMartin Klozik <martinx.klozik@intel.com>
Thu, 13 Aug 2015 10:09:09 +0000 (11:09 +0100)
committerMartin Klozik <martinx.klozik@intel.com>
Thu, 13 Aug 2015 10:27:04 +0000 (11:27 +0100)
This test adds a multistream config item,
taking the required number of flows to setup in the traffic,
to the existing testcase and then running the standard
2544 Throughput test. The config is plumbed through
from the 01_testcase.conf via ITraffic to the IxNet.
01_testcase.conf contains new parameter MultiStream
for 2544 Throughput test.

JIRA: VSPERF-19

Change-Id: I12e0e76a5f54dc13b854f3a65f3a4a0fe90ff885
Signed-off-by: Radek Zetik <radekx.zetik@intel.com>
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>
Reviewed-by: Eugene Snider <Eugene.Snider@huawei.com>
Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
conf/01_testcases.conf
docs/NEWS.md
testcases/testcase.py
tools/pkt_gen/ixia/ixia.py
tools/pkt_gen/ixnet/ixnet.py
tools/pkt_gen/ixnet/ixnetrfc2544.tcl
tools/pkt_gen/trafficgen/trafficgen.py

index 7b6c007..cfe0b46 100755 (executable)
@@ -63,5 +63,16 @@ PERFORMANCE_TESTS = [
         "Description": "RFC2544 Phy2Phy Continuous Stream",
         "biDirectional": "True",
     },
+    {
+        "Name": "phy2phy_scalability",
+        "Traffic Type": "rfc2544",
+        "Collector": "cpu",
+        "Deployment": "p2p",
+        "biDirectional": "True",
+        "Description": "LTD.Scalability.RFC2544.0PacketLoss",
+        # MultiStream defines number of flows simulated by traffic generator
+        # allowed range: 0-65535; value 0 disables MultiStream feature
+        "MultiStream": "8000",
+    },
 
 ]
index 0e32258..8d92c2c 100644 (file)
@@ -20,6 +20,7 @@ once the community has digested the initial release.
   * Verified on CentOS7
   * Install & Quickstart documentation
 
+* Implementation of LTD.Scalability.RFC2544.0PacketLoss testcase
 * Better support for mixing tests types with Deployment Scenarios
 * Re-work based on community feedback of TOIT
   * Framework support for other vSwitches
index 83e038d..f5b3578 100644 (file)
@@ -47,6 +47,7 @@ class TestCase(object):
         if self._frame_mod:
             self._frame_mod = self._frame_mod.lower()
         self._results_dir = results_dir
+        self._multistream = cfg.get('MultiStream', 0)
 
     def run(self):
         """Run the test
@@ -76,7 +77,9 @@ class TestCase(object):
         with vswitch_ctl:
             if vnf_ctl:
                 vnf_ctl.start()
-                traffic = {'traffic_type': self._traffic_type, 'bidir': self._bidir}
+                traffic = {'traffic_type': self._traffic_type,
+                           'bidir': self._bidir,
+                           'multistream': self._multistream}
                 vswitch = vswitch_ctl.get_vswitch()
                 if self._frame_mod == "vlan":
                     flow = {'table':'2', 'priority':'1000', 'metadata':'2', 'actions': ['push_vlan:0x8100','goto_table:3']}
index 92ef520..992aff3 100755 (executable)
@@ -228,8 +228,7 @@ class Ixia(trafficgen.ITrafficGenerator):
 
         #TODO - implement Burst results setting via TrafficgenResults.
 
-    def send_cont_traffic(self, traffic=None, time=20, framerate=100,
-                          multistream=False):
+    def send_cont_traffic(self, traffic=None, time=20, framerate=100):
         """See ITrafficGenerator for description
         """
         flow = {
@@ -237,15 +236,14 @@ class Ixia(trafficgen.ITrafficGenerator):
             'time': time,
             'type': 'contPacket',
             'framerate': framerate,
-            'multipleStreams': multistream,
+            'multipleStreams': traffic['multistream'],
         }
 
         result = self._send_traffic(flow, traffic)
 
         return Ixia._create_result(result)
 
-    def start_cont_traffic(self, traffic=None, time=20, framerate=100,
-                           multistream=False):
+    def start_cont_traffic(self, traffic=None, time=20, framerate=100):
         """See ITrafficGenerator for description
         """
         return self.send_cont_traffic(traffic, 0, framerate)
@@ -256,7 +254,7 @@ class Ixia(trafficgen.ITrafficGenerator):
         return self.run_tcl('stopTraffic')
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0, multistream=False):
+                                lossrate=0.0):
         """See ITrafficGenerator for description
         """
         params = {}
@@ -265,7 +263,7 @@ class Ixia(trafficgen.ITrafficGenerator):
             'trials': trials,
             'duration': duration,
             'lossrate': lossrate,
-            'multipleStreams': multistream,
+            'multipleStreams': traffic['multistream'],
         }
         params['traffic'] = self.traffic_defaults.copy()
 
index bb999f7..28ee8aa 100755 (executable)
@@ -200,16 +200,14 @@ class IxNet(trafficgen.ITrafficGenerator):
         """
         pass
 
-    def send_cont_traffic(self, traffic=None, time=30, framerate=100,
-                          multistream=False):
+    def send_cont_traffic(self, traffic=None, time=30, framerate=100):
         """See ITrafficGenerator for description
         """
-        self.start_cont_traffic(traffic, time, framerate, multistream)
+        self.start_cont_traffic(traffic, time, framerate)
 
         return self.stop_cont_traffic()
 
-    def start_cont_traffic(self, traffic=None, time=30, framerate=100,
-                           multistream=False):
+    def start_cont_traffic(self, traffic=None, time=30, framerate=100):
         """Start transmission.
         """
         self._bidir = traffic['bidir']
@@ -219,7 +217,7 @@ class IxNet(trafficgen.ITrafficGenerator):
             'binary': False,  # don't do binary search and send one stream
             'time': time,
             'framerate': framerate,
-            'multipleStreams': multistream,
+            'multipleStreams': traffic['multistream'],
             'rfc2544TestType': 'throughput',
         }
         self._params['traffic'] = self.traffic_defaults.copy()
@@ -253,16 +251,15 @@ class IxNet(trafficgen.ITrafficGenerator):
         return self._wait_result()
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0, multistream=False):
+                                lossrate=0.0):
         """See ITrafficGenerator for description
         """
-        self.start_rfc2544_throughput(traffic, trials, duration, lossrate,
-                                      multistream)
+        self.start_rfc2544_throughput(traffic, trials, duration, lossrate)
 
         return self.wait_rfc2544_throughput()
 
     def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                 lossrate=0.0, multistream=False):
+                                 lossrate=0.0):
         """Start transmission.
         """
         self._bidir = traffic['bidir']
@@ -273,7 +270,7 @@ class IxNet(trafficgen.ITrafficGenerator):
             'trials': trials,
             'duration': duration,
             'lossrate': lossrate,
-            'multipleStreams': multistream,
+            'multipleStreams': traffic['multistream'],
             'rfc2544TestType': 'throughput',
         }
         self._params['traffic'] = self.traffic_defaults.copy()
@@ -385,16 +382,15 @@ class IxNet(trafficgen.ITrafficGenerator):
         return parse_ixnet_rfc_results(parse_result_string(output[0]))
 
     def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
-                               lossrate=0.0, multistream=False):
+                               lossrate=0.0):
         """See ITrafficGenerator for description
         """
-        self.start_rfc2544_back2back(traffic, trials, duration, lossrate,
-                                     multistream)
+        self.start_rfc2544_back2back(traffic, trials, duration, lossrate)
 
         return self.wait_rfc2544_back2back()
 
     def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
-                                lossrate=0.0, multistream=False):
+                                lossrate=0.0):
         """Start transmission.
         """
         self._bidir = traffic['bidir']
@@ -405,7 +401,7 @@ class IxNet(trafficgen.ITrafficGenerator):
             'trials': trials,
             'duration': duration,
             'lossrate': lossrate,
-            'multipleStreams': multistream,
+            'multipleStreams': traffic['multistream'],
             'rfc2544TestType': 'back2back',
         }
         self._params['traffic'] = self.traffic_defaults.copy()
index d7472c0..2a156d3 100755 (executable)
@@ -106,8 +106,17 @@ proc startRfc2544Test { testSpec trafficSpec } {
     }
 
     set multipleStreams         [dict get $testSpec multipleStreams]
+    if {($multipleStreams < 0)} {
+        set multipleStreams    0
+    }
+    set numflows               64000
 
     if {$multipleStreams} {
+        if {($multipleStreams > 65535)} {
+            set numflows       65535
+        } else {
+            set numflows       $multipleStreams
+        }
         set multipleStreams     increment
     } else {
         set multipleStreams     singleValue
@@ -2818,7 +2827,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
      -valueType $multipleStreams \
      -activeFieldChoice False \
      -startValue {0} \
-     -countValue {64000}
+     -countValue $numflows
     sg_commit
     set sg_field [lindex [ixNet remapIds $sg_field] 0]
 
@@ -4453,7 +4462,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
      -valueType $multipleStreams \
      -activeFieldChoice False \
      -startValue {0} \
-     -countValue {64000}
+     -countValue $numflows
     sg_commit
     set sg_field [lindex [ixNet remapIds $sg_field] 0]
 
index 13af6b8..37f6c09 100755 (executable)
@@ -101,8 +101,7 @@ class ITrafficGenerator(object):
         """
         raise NotImplementedError('Please call an implementation.')
 
-    def send_cont_traffic(self, traffic=None, time=20, framerate=0,
-                          multistream=False):
+    def send_cont_traffic(self, traffic=None, time=20, framerate=0):
         """Send a continuous flow of traffic.
 
         Send packets at ``framerate``, using ``traffic`` configuration,
@@ -127,8 +126,7 @@ class ITrafficGenerator(object):
         """
         raise NotImplementedError('Please call an implementation.')
 
-    def start_cont_traffic(self, traffic=None, time=20, framerate=0,
-                           multistream=False):
+    def start_cont_traffic(self, traffic=None, time=20, framerate=0):
         """Non-blocking version of 'send_cont_traffic'.
 
         Start transmission and immediately return. Do not wait for
@@ -142,7 +140,7 @@ class ITrafficGenerator(object):
         raise NotImplementedError('Please call an implementation.')
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0, multistream=False):
+                                lossrate=0.0):
         """Send traffic per RFC2544 throughput test specifications.
 
         Send packets at a variable rate, using ``traffic``
@@ -170,7 +168,7 @@ class ITrafficGenerator(object):
         raise NotImplementedError('Please call an implementation.')
 
     def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                 lossrate=0.0, multistream=False):
+                                 lossrate=0.0):
         """Non-blocking version of 'send_rfc2544_throughput'.
 
         Start transmission and immediately return. Do not wait for
@@ -184,7 +182,7 @@ class ITrafficGenerator(object):
         raise NotImplementedError('Please call an implementation.')
 
     def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
-                               lossrate=0.0, multistream=False):
+                               lossrate=0.0):
         """Send traffic per RFC2544 back2back test specifications.
 
         Send packets at a fixed rate, using ``traffic``
@@ -207,7 +205,7 @@ class ITrafficGenerator(object):
         raise NotImplementedError('Please call an implementation.')
 
     def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
-                                lossrate=0.0, multistream=False):
+                                lossrate=0.0):
         """Non-blocking version of 'send_rfc2544_back2back'.
 
         Start transmission and immediately return. Do not wait for